org.eclipse.smila.jobmanager.internal
Class JobRunImpl
java.lang.Object
org.eclipse.smila.jobmanager.internal.JobRunImpl
- All Implemented Interfaces:
- JobRun
public class JobRunImpl
- extends java.lang.Object
- implements JobRun
Implementation of JobRun.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JobRunImpl
public JobRunImpl(java.lang.String runId,
java.lang.String jobName,
RunStorage runStorage,
DefinitionPersistence definitions)
throws java.lang.Exception
- Constructs the job run data for a job run.
- Parameters:
runId - the id of the run.jobName - The job name.runStorage - The runStorage.definitions - The DefinitionPersistence where the definitions can be retrieved (e.g. WorkerDefinition).
- Throws:
java.lang.Exception - An exception if something goes wrong
getJobName
public java.lang.String getJobName()
- Specified by:
getJobName in interface JobRun
- Returns:
- name of job definition
getJobRunId
public java.lang.String getJobRunId()
- Specified by:
getJobRunId in interface JobRun
- Returns:
- The ID of the job run.
getStartAction
public WorkflowAction getStartAction()
- Specified by:
getStartAction in interface JobRun
- Returns:
- start action of this job run.
getParameters
public AnyMap getParameters()
- Specified by:
getParameters in interface JobRun
- Returns:
- parameters of this job run.
getJobDefinition
public JobDefinition getJobDefinition()
- Specified by:
getJobDefinition in interface JobRun
- Returns:
- the JobDefinition.
getInputBucketsForAction
public java.util.Map<java.lang.String,Bucket> getInputBucketsForAction(WorkflowAction action)
- Specified by:
getInputBucketsForAction in interface JobRun
- Returns:
- input buckets of given workflow action. (key: input slot name, value: bucket)
getOutputBucketsForAction
public java.util.Map<java.lang.String,Bucket> getOutputBucketsForAction(WorkflowAction action)
- Specified by:
getOutputBucketsForAction in interface JobRun
- Returns:
- output buckets of given workflow action. (key: input slot name, value: bucket)
getBuckets
public java.util.Collection<Bucket> getBuckets()
- Specified by:
getBuckets in interface JobRun
- Returns:
- The Collection of Bucket instances of the JobRun.
getBucket
public Bucket getBucket(java.lang.String bucketName)
- Specified by:
getBucket in interface JobRun
- Parameters:
bucketName - the bucket's name.
- Returns:
- the job's Bucket instance for a bucket with the given name
isTriggeredBy
public boolean isTriggeredBy(Bucket triggeringBucket)
- Specified by:
isTriggeredBy in interface JobRun
- Parameters:
triggeringBucket - a bucket changed by another workflow
- Returns:
- true if this job run can be triggered by this bucket.
getTriggeredActionsForBucket
public java.util.Collection<WorkflowAction> getTriggeredActionsForBucket(java.lang.String bucketName)
- Specified by:
getTriggeredActionsForBucket in interface JobRun
- Returns:
- workflow actions triggered by given bucket.
getTriggerBuckets
public java.util.Collection<Bucket> getTriggerBuckets()
- Specified by:
getTriggerBuckets in interface JobRun
- Returns:
- persistent input buckets of start action.