pulling.executing
Class ServerSideExecuter

java.lang.Object
  extended by pulling.executing.ServerSideExecuter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ServerSideExecuter_BuiltIn, ServerSideExecuter_Xgrid

public abstract class ServerSideExecuter
extends java.lang.Object
implements java.io.Serializable

This abstract class defines the services that should be implemented in a class that will be part of the execution layer on the Server side.

Author:
Majd Kokaly
See Also:
Serialized Form

Field Summary
static int NOT_IMPLEMENTED
          This constant is returned when a method is not implemented
 
Constructor Summary
ServerSideExecuter()
           
 
Method Summary
abstract  long deleteJob(long id, java.lang.String hostname, java.lang.String password)
          This method deletes the job with id "id" on hostname "hostname"\
abstract  java.lang.String getDateStarted(long id, java.lang.String hostname, java.lang.String password)
           
abstract  java.lang.String getDateStopped(long id, java.lang.String hostname, java.lang.String password)
           
abstract  double getDateSubmitted(long id, java.lang.String hostname, java.lang.String password)
           
abstract  java.lang.String getJobStatus(long id, java.lang.String hostname, java.lang.String password)
           
abstract  double getPercentageDone(long id, java.lang.String hostname, java.lang.String password)
           
abstract  void startExecuter()
          In this method the executer is set up.
abstract  void stopExecuter()
          In this method the executer is stopped and streams are closed
abstract  long stopJob(long id, java.lang.String hostname, java.lang.String password)
          This method stops the job with id "id" on hostname "hostname"\
abstract  long submitLoopJob(java.lang.String hostName, java.lang.String password, java.lang.String workingDirectory, long iter, double ratio)
          This method is used by the Mapper to submit loop jobs
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_IMPLEMENTED

public static final int NOT_IMPLEMENTED
This constant is returned when a method is not implemented

See Also:
Constant Field Values
Constructor Detail

ServerSideExecuter

public ServerSideExecuter()
Method Detail

startExecuter

public abstract void startExecuter()
In this method the executer is set up.


stopExecuter

public abstract void stopExecuter()
In this method the executer is stopped and streams are closed


submitLoopJob

public abstract long submitLoopJob(java.lang.String hostName,
                                   java.lang.String password,
                                   java.lang.String workingDirectory,
                                   long iter,
                                   double ratio)
This method is used by the Mapper to submit loop jobs

Parameters:
hostName - The hostname of the Server object to send the job to.
password - The password of the Server object to send the job to.
workingDirectory -
iter - The iterations of the job.
ratio - The ratio of the jobs.
Returns:
a number. It depends on the implementation.

stopJob

public abstract long stopJob(long id,
                             java.lang.String hostname,
                             java.lang.String password)
This method stops the job with id "id" on hostname "hostname"\

Parameters:
id - is job id
hostname - is the hostname of the server executing that job
password -
Returns:
NOT_IMPLEMENTED if not implemented

deleteJob

public abstract long deleteJob(long id,
                               java.lang.String hostname,
                               java.lang.String password)
This method deletes the job with id "id" on hostname "hostname"\

Parameters:
id - is job id
hostname - is the hostname of the server executing that job
password -
Returns:
NOT_IMPLEMENTED if not implemented

getPercentageDone

public abstract double getPercentageDone(long id,
                                         java.lang.String hostname,
                                         java.lang.String password)
Parameters:
id - is job id
hostname - is the hostname of the server executing that job
password -
Returns:
the percentage done from job with job id "id"

getDateSubmitted

public abstract double getDateSubmitted(long id,
                                        java.lang.String hostname,
                                        java.lang.String password)
Parameters:
id - is job id
hostname - is the hostname of the server executing that job.
password -
Returns:
the date when the job with id "id" has submitted to the execution layer.

getDateStarted

public abstract java.lang.String getDateStarted(long id,
                                                java.lang.String hostname,
                                                java.lang.String password)
Parameters:
id - is job id
hostname - is the hostname of the server executing that job.
password -
Returns:
the date when the job with id "id" has started.

getDateStopped

public abstract java.lang.String getDateStopped(long id,
                                                java.lang.String hostname,
                                                java.lang.String password)
Parameters:
id - is job id
hostname - is the hostname of the server executing that job
password -
Returns:
the date when the job with id "id" has stopped.

getJobStatus

public abstract java.lang.String getJobStatus(long id,
                                              java.lang.String hostname,
                                              java.lang.String password)
Parameters:
id - is job id
hostname - is the hostname of the server executing that job
password -
Returns:
the status of the job with id "id" (e.g. Runnung, Done)