g-Eclipse
Release 1.0.0

eu.geclipse.batch
Class BatchJobInfo

java.lang.Object
  extended by eu.geclipse.batch.BatchJobInfo
All Implemented Interfaces:
IBatchJobInfo

public class BatchJobInfo
extends java.lang.Object
implements IBatchJobInfo

Class for holding information about a specific Grid job.


Nested Class Summary
 
Nested classes/interfaces inherited from interface eu.geclipse.batch.IBatchJobInfo
IBatchJobInfo.JobState
 
Constructor Summary
BatchJobInfo(java.lang.String jobId, java.lang.String jobName, java.lang.String userAccount, java.lang.String timeUse, IBatchJobInfo.JobState status, java.lang.String queueName, IBatchService batchWrapper)
          Create a new QueueInfo holder, from the arguments.
 
Method Summary
 void deleteJob()
          Deletes this job from the batch service.
 java.lang.String getJobId()
           
 java.lang.String getJobName()
           
 java.lang.String getQueueName()
           
 java.lang.String getServiceTypeName()
          Return the type of batch service name that handles this batch job.
 IBatchJobInfo.JobState getStatus()
           
 java.lang.String getTimeUse()
           
 java.lang.String getUserAccount()
           
 void holdJob()
          Puts a hold on a job in the queue of the batch service.
 boolean isDeletable()
          Can this job be deleted.
 boolean isHoldable()
          Can this job be held.
 boolean isMovable()
          Can this job be moved.
 boolean isReleasable()
          Can this job be released.
 boolean isReRunnable()
          Can this job be reRun.
 void moveJob(java.lang.String destQueue, java.lang.String destServer)
          Move this job to another worker node or batch service.
 void releaseJob()
          Release a job with a previous hold in queue of the batch system.
 void reRunJob()
          ReRun the currently executing job in the batch system.
 void setQueueName(java.lang.String queueName)
           
 void setStatus(IBatchJobInfo.JobState status)
           
 void setTimeUse(java.lang.String timeUse)
           
 void setUserAccount(java.lang.String userAccount)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchJobInfo

public BatchJobInfo(java.lang.String jobId,
                    java.lang.String jobName,
                    java.lang.String userAccount,
                    java.lang.String timeUse,
                    IBatchJobInfo.JobState status,
                    java.lang.String queueName,
                    IBatchService batchWrapper)
Create a new QueueInfo holder, from the arguments.

Parameters:
jobId - The unique id of the job.
jobName - The name of the job.
userAccount - The name of the pool account that are used to execute this job.
timeUse - How much time this job have used.
status - The current status of this job.
queueName - The name of the queue where this job is placed.
batchWrapper - The wrapper to access the batch service where this job is queued.
Method Detail

getQueueName

public java.lang.String getQueueName()
Specified by:
getQueueName in interface IBatchJobInfo
Returns:
the queueName

setQueueName

public void setQueueName(java.lang.String queueName)
Specified by:
setQueueName in interface IBatchJobInfo
Parameters:
queueName - the queueName to set

getStatus

public IBatchJobInfo.JobState getStatus()
Specified by:
getStatus in interface IBatchJobInfo
Returns:
the status

setStatus

public void setStatus(IBatchJobInfo.JobState status)
Specified by:
setStatus in interface IBatchJobInfo
Parameters:
status - the status to set

getTimeUse

public java.lang.String getTimeUse()
Specified by:
getTimeUse in interface IBatchJobInfo
Returns:
the timeUse

setTimeUse

public void setTimeUse(java.lang.String timeUse)
Specified by:
setTimeUse in interface IBatchJobInfo
Parameters:
timeUse - the timeUse to set

getUserAccount

public java.lang.String getUserAccount()
Specified by:
getUserAccount in interface IBatchJobInfo
Returns:
the userAccount

setUserAccount

public void setUserAccount(java.lang.String userAccount)
Specified by:
setUserAccount in interface IBatchJobInfo
Parameters:
userAccount - the userAccount to set

getJobId

public java.lang.String getJobId()
Specified by:
getJobId in interface IBatchJobInfo
Returns:
the jobId

getJobName

public java.lang.String getJobName()
Specified by:
getJobName in interface IBatchJobInfo
Returns:
the jobName

isDeletable

public boolean isDeletable()
Can this job be deleted.

Specified by:
isDeletable in interface IBatchJobInfo
Returns:
Returns true if this job can be deleted, false otherwise.

isMovable

public boolean isMovable()
Can this job be moved.

Specified by:
isMovable in interface IBatchJobInfo
Returns:
Returns true if this job can be moved, false otherwise.

isHoldable

public boolean isHoldable()
Can this job be held.

Specified by:
isHoldable in interface IBatchJobInfo
Returns:
Returns true<\code> if this job can be held, false otherwise.

isReleasable

public boolean isReleasable()
Can this job be released.

Specified by:
isReleasable in interface IBatchJobInfo
Returns:
Returns true<\code> if this job can be released, false otherwise.

isReRunnable

public boolean isReRunnable()
Can this job be reRun.

Specified by:
isReRunnable in interface IBatchJobInfo
Returns:
Returns true<\code> if this job can be reRun, false otherwise.

deleteJob

public void deleteJob()
               throws ProblemException
Deletes this job from the batch service.

Specified by:
deleteJob in interface IBatchJobInfo
Throws:
ProblemException - If command is not executed successfully

moveJob

public void moveJob(java.lang.String destQueue,
                    java.lang.String destServer)
             throws ProblemException
Move this job to another worker node or batch service.

Specified by:
moveJob in interface IBatchJobInfo
Parameters:
destQueue - The destination queue, null if no destination queue.
destServer - The destination server, null if no destination server.
Throws:
ProblemException - If command is not executed successfully

holdJob

public void holdJob()
             throws ProblemException
Puts a hold on a job in the queue of the batch service.

Specified by:
holdJob in interface IBatchJobInfo
Throws:
ProblemException - If command is not executed successfully

releaseJob

public void releaseJob()
                throws ProblemException
Release a job with a previous hold in queue of the batch system.

Specified by:
releaseJob in interface IBatchJobInfo
Throws:
ProblemException - If command is not executed successfully

reRunJob

public void reRunJob()
              throws ProblemException
ReRun the currently executing job in the batch system.

Specified by:
reRunJob in interface IBatchJobInfo
Throws:
ProblemException - If command is not executed successfully

getServiceTypeName

public java.lang.String getServiceTypeName()
Return the type of batch service name that handles this batch job.

Specified by:
getServiceTypeName in interface IBatchJobInfo
Returns:
Returns the batch service name if known, null if unknown.

g-Eclipse
Release 1.0.0