Merged hyracks_btree_updates_next into this branch.

git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_dev_next@674 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/HyracksLocalConnection.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/HyracksLocalConnection.java
index b41e92c..ee0b276 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/HyracksLocalConnection.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/HyracksLocalConnection.java
@@ -14,6 +14,14 @@
  */
 package edu.uci.ics.hyracks.api.client;
 
+/**
+ * Connection Class used by a Hyracks Client that is colocated in the same VM
+ * with the Cluster Controller. Usually, clients must not use this class. This
+ * is used internally for testing purposes.
+ * 
+ * @author vinayakb
+ * 
+ */
 public final class HyracksLocalConnection extends AbstractHyracksConnection {
     public HyracksLocalConnection(IHyracksClientInterface hci) throws Exception {
         super("localhost", hci);
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/HyracksRMIConnection.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/HyracksRMIConnection.java
index 930126d..65d82a8 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/HyracksRMIConnection.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/HyracksRMIConnection.java
@@ -19,7 +19,26 @@
 import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
 
+/**
+ * Connection Class used by a Hyracks Client to interact with a Hyracks Cluster
+ * Controller using RMI. Usually, such a connection would be used when the CC
+ * runs in a separate JVM from the client (The most common case).
+ * 
+ * @author vinayakb
+ * 
+ */
 public final class HyracksRMIConnection extends AbstractHyracksConnection {
+    /**
+     * Constructor to create a connection to the Hyracks Cluster Controller.
+     * 
+     * @param host
+     *            Host name (or IP Address) where the Cluster Controller can be
+     *            reached.
+     * @param port
+     *            Port to reach the Hyracks Cluster Controller at the specified
+     *            host name.
+     * @throws Exception
+     */
     public HyracksRMIConnection(String host, int port) throws Exception {
         super(host, lookupHCI(host, port));
     }
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/IHyracksClientConnection.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/IHyracksClientConnection.java
index 659a181..5563655 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/IHyracksClientConnection.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/IHyracksClientConnection.java
@@ -22,18 +22,88 @@
 import edu.uci.ics.hyracks.api.job.JobSpecification;
 import edu.uci.ics.hyracks.api.job.JobStatus;
 
+/**
+ * Interface used by clients to communicate with the Hyracks Cluster Controller.
+ * 
+ * @author vinayakb
+ * 
+ */
 public interface IHyracksClientConnection {
+    /**
+     * Create a Hyracks Application
+     * 
+     * @param appName
+     *            Name of the application
+     * @param harFile
+     *            Archive that contains deployable code for the application
+     * @throws Exception
+     */
     public void createApplication(String appName, File harFile) throws Exception;
 
+    /**
+     * Destroy an already-deployed Hyracks application
+     * 
+     * @param appName
+     *            Name of the application
+     * @throws Exception
+     */
     public void destroyApplication(String appName) throws Exception;
 
+    /**
+     * Creates a Job Instance in the specified Hyracks application using the
+     * specified {@link JobSpecification}.
+     * 
+     * @param appName
+     *            Name of the application
+     * @param jobSpec
+     *            Job Specification
+     * @return
+     * @throws Exception
+     */
     public JobId createJob(String appName, JobSpecification jobSpec) throws Exception;
 
+    /**
+     * Creates a Job Instance in the specified Hyracks application using the
+     * specified {@link JobSpecification}. The specified flags are used to
+     * configure the Job creation process.
+     * 
+     * @param appName
+     *            Name of the application
+     * @param jobSpec
+     *            Job Specification
+     * @param jobFlags
+     *            Flags
+     * @return
+     * @throws Exception
+     */
     public JobId createJob(String appName, JobSpecification jobSpec, EnumSet<JobFlag> jobFlags) throws Exception;
 
+    /**
+     * Gets the status of the specified Job.
+     * 
+     * @param jobId
+     *            JobId of the Job
+     * @return {@link JobStatus}
+     * @throws Exception
+     */
     public JobStatus getJobStatus(JobId jobId) throws Exception;
 
+    /**
+     * Start the specified Job.
+     * 
+     * @param jobId
+     *            JobId of the Job.
+     * @throws Exception
+     */
     public void start(JobId jobId) throws Exception;
 
+    /**
+     * Waits untile the specified job has completed, either successfully or has
+     * encountered a permanent failure.
+     * 
+     * @param jobId
+     *            JobId of the Job
+     * @throws Exception
+     */
     public void waitForCompletion(JobId jobId) throws Exception;
 }
\ No newline at end of file