SMILA 1.0 API documentation

org.eclipse.smila.jobmanager.internal
Class JobRunDataProviderImpl

java.lang.Object
  extended by org.eclipse.smila.jobmanager.internal.JobRunDataProviderImpl
All Implemented Interfaces:
JobRunDataProvider

public class JobRunDataProviderImpl
extends java.lang.Object
implements JobRunDataProvider

Implements JobRunDataProvider.


Constructor Summary
JobRunDataProviderImpl()
           
 
Method Summary
 java.util.Collection<java.lang.String> getCompletedJobRunIds(java.lang.String jobName)
          get Ids of complete job runs.
 AnyMap getJobRunData(java.lang.String jobName, java.lang.String jobId)
          
 AnyMap getJobRunData(java.lang.String jobName, java.lang.String jobId, boolean returnDetails)
          
 JobRunDefinitions getJobRunDefinitions(java.lang.String jobName)
           
 JobRunInfo getJobRunInfo(java.lang.String jobName)
          get info on current job run.
 WorkerDefinition getWorker(java.lang.String name)
          Returns a worker from the persistence definition.
 AnyMap getWorkflowRunData(java.lang.String jobName, java.lang.String jobId, java.lang.String workflowRunId)
          get information about a workflow run.
 void setDefinitionPersistence(DefinitionPersistence defPersistence)
          set OSGI service.
 void setPermanentStorage(PermanentStorage permStorage)
           
 void setRunStorage(RunStorage runStorage)
           
 void unsetDefinitionPersistence(DefinitionPersistence defPersistence)
          unset OSGI service.
 void unsetPermanentStorage(PermanentStorage permStorage)
           
 void unsetRunStorage(RunStorage runStorage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobRunDataProviderImpl

public JobRunDataProviderImpl()
Method Detail

getJobRunData

public AnyMap getJobRunData(java.lang.String jobName,
                            java.lang.String jobId)
                     throws JobManagerException

Specified by:
getJobRunData in interface JobRunDataProvider
Parameters:
jobName - name of the job for which to monitor the run.
jobId - id of the job run to get the monitoring data. May be either the current run or a completed run.
Returns:
monitoring data for the job run with the given id.
Throws:
JobManagerException - error getting job run data

getJobRunData

public AnyMap getJobRunData(java.lang.String jobName,
                            java.lang.String jobId,
                            boolean returnDetails)
                     throws JobManagerException

Specified by:
getJobRunData in interface JobRunDataProvider
Parameters:
jobName - name of the job for which to monitor the run.
jobId - id of the job run to get the monitoring data. May be either the current run or a completed run.
returnDetails - whether to return details (e.g. workflow/bucket definition)
Returns:
monitoring data for the job run with the given id.
Throws:
JobManagerException - error getting job run data

getWorkflowRunData

public AnyMap getWorkflowRunData(java.lang.String jobName,
                                 java.lang.String jobId,
                                 java.lang.String workflowRunId)
                          throws JobManagerException
Description copied from interface: JobRunDataProvider
get information about a workflow run. The result contains these keys with integer values: The result may contain additional keys.

Specified by:
getWorkflowRunData in interface JobRunDataProvider
Returns:
workflow run information
Throws:
JobManagerException - jobrun or workflowrun are not active anymore.

getJobRunInfo

public JobRunInfo getJobRunInfo(java.lang.String jobName)
                         throws JobManagerException
Description copied from interface: JobRunDataProvider
get info on current job run.

Specified by:
getJobRunInfo in interface JobRunDataProvider
Parameters:
jobName - job name
Returns:
if job is defined and active: id and state of current run. Else null.
Throws:
JobManagerException - error getting state.

getCompletedJobRunIds

public java.util.Collection<java.lang.String> getCompletedJobRunIds(java.lang.String jobName)
                                                             throws JobManagerException
Description copied from interface: JobRunDataProvider
get Ids of complete job runs.

Specified by:
getCompletedJobRunIds in interface JobRunDataProvider
Parameters:
jobName - job name
Returns:
Ids of completed job runs, sorted lexicographically ascending. Empty set if job is not defined or no completed job runs exists.
Throws:
JobManagerException - error getting state.

getWorker

public WorkerDefinition getWorker(java.lang.String name)
                           throws ConfigNotFoundException
Returns a worker from the persistence definition.

Parameters:
name - the name of the worker
Returns:
the worker with the given name
Throws:
ConfigNotFoundException - the worker does not exist.

getJobRunDefinitions

public JobRunDefinitions getJobRunDefinitions(java.lang.String jobName)
                                       throws JobManagerException
Specified by:
getJobRunDefinitions in interface JobRunDataProvider
Returns:
the currently persisted job/workflow/bucket definitions for the given job.
Throws:
JobManagerException

setDefinitionPersistence

public void setDefinitionPersistence(DefinitionPersistence defPersistence)
set OSGI service.


unsetDefinitionPersistence

public void unsetDefinitionPersistence(DefinitionPersistence defPersistence)
unset OSGI service.


setPermanentStorage

public void setPermanentStorage(PermanentStorage permStorage)
Parameters:
permStorage - PermanentStorage reference.

unsetPermanentStorage

public void unsetPermanentStorage(PermanentStorage permStorage)
Parameters:
permStorage - PermanentStorage reference.

setRunStorage

public void setRunStorage(RunStorage runStorage)
Parameters:
runStorage - RunStorage reference.

unsetRunStorage

public void unsetRunStorage(RunStorage runStorage)
Parameters:
runStorage - RunStorage reference.

SMILA 1.0 API documentation