org.icenigrid.gridsam.core
Interface JobInstance

All Known Subinterfaces:
MutableJobInstance
All Known Implementing Classes:
DefaultMutableJobInstance

public interface JobInstance

Interface representing a job instance in the GridSAM JobManager API

Author:
wwhl

Method Summary
 java.lang.String getID()
          the job identifier
 org.icenigrid.schema.jsdl.y2005.m11.JobDefinitionDocument getJobDefinition()
          get the Job description document as a string
 java.util.List getJobStages()
          get the job status history associated with this job instance
 JobStage getLastKnownStage()
          get the last known job stage
 java.util.Map getProperties()
          get the properties associated with the job
 boolean isInStage(JobState pState)
          test whether the job is currently in the given state
 boolean wasInStage(JobState pState)
          test whether the job has been in the given state
 

Method Detail

getID

java.lang.String getID()
the job identifier

Returns:
job identifier

getJobDefinition

org.icenigrid.schema.jsdl.y2005.m11.JobDefinitionDocument getJobDefinition()
get the Job description document as a string

Returns:
JobDefinitionDocument the jsdl:JobDefinition element

getJobStages

java.util.List getJobStages()
get the job status history associated with this job instance

Returns:
List of JobStage in chronological order

isInStage

boolean isInStage(JobState pState)
test whether the job is currently in the given state

Parameters:
pState - the state to test
Returns:
true if getLastKnownStage().getState.equals(pState)

wasInStage

boolean wasInStage(JobState pState)
test whether the job has been in the given state

Parameters:
pState - the state to test
Returns:
true if some x: getJobStages(), x.getState().equals(pState)

getLastKnownStage

JobStage getLastKnownStage()
get the last known job stage

Returns:
JobStage same as calling getJobStages().get(getJobStages().size()-1)

getProperties

java.util.Map getProperties()
get the properties associated with the job

Returns:
Properties list of key-value pairs


Copyright © 2008. All Rights Reserved.