org.icenigrid.gridsam.core
Class JobState

java.lang.Object
  extended by org.icenigrid.gridsam.core.JobState
All Implemented Interfaces:
java.io.Serializable

public class JobState
extends java.lang.Object
implements java.io.Serializable

Enumeration class representing Job States

See Also:
Serialized Form

Field Summary
static JobState ACTIVE
          The job has received resource, and the application is executing
static JobState DONE
          The job has completed successfully
static JobState EXECUTED
          The job has been executed (i.e.
static JobState FAILED
          The job terminated before completion because of an error, user-triggered cancel, or system-triggered cancel
static JobState PENDING
          The job is waiting for resource to become available in order to run
static JobState STAGED_IN
          The job's data have been staged into the job execution environment
static JobState STAGED_OUT
          The job's data have been staged out from the job execution environment
static JobState STAGING_IN
          The job's data are staging into the job execution environment
static JobState STAGING_OUT
          The job's data are staging out from the job execution environment
static JobState TERMINATED
          The job has been terminated by user
static JobState TERMINATING
          The job is being terminated by user
static JobState UNDEFINED
          The job state is undefined
 
Method Summary
 boolean equals(java.lang.Object o)
          equality check
 java.util.List getPossibleNextState()
          get a list of JobState this state can advance to
 int hashCode()
          get the hashcode of this object
 boolean isTerminal()
          test whether this state is a terminal state
static JobState parse(java.lang.String pValue)
          parse a state value into a JobState object
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PENDING

public static final JobState PENDING
The job is waiting for resource to become available in order to run


STAGING_IN

public static final JobState STAGING_IN
The job's data are staging into the job execution environment


STAGED_IN

public static final JobState STAGED_IN
The job's data have been staged into the job execution environment


STAGING_OUT

public static final JobState STAGING_OUT
The job's data are staging out from the job execution environment


STAGED_OUT

public static final JobState STAGED_OUT
The job's data have been staged out from the job execution environment


ACTIVE

public static final JobState ACTIVE
The job has received resource, and the application is executing


EXECUTED

public static final JobState EXECUTED
The job has been executed (i.e. exit code is available), however not yet completed


FAILED

public static final JobState FAILED
The job terminated before completion because of an error, user-triggered cancel, or system-triggered cancel


DONE

public static final JobState DONE
The job has completed successfully


TERMINATING

public static final JobState TERMINATING
The job is being terminated by user


TERMINATED

public static final JobState TERMINATED
The job has been terminated by user


UNDEFINED

public static final JobState UNDEFINED
The job state is undefined

Method Detail

getPossibleNextState

public java.util.List getPossibleNextState()
get a list of JobState this state can advance to

Returns:
List of JobState that are directly the advance state of the current state

isTerminal

public boolean isTerminal()
test whether this state is a terminal state

Returns:
true if this state is terminal, false otherwise

parse

public static final JobState parse(java.lang.String pValue)
parse a state value into a JobState object

Parameters:
pValue - state value
Returns:
JobState the job state
Throws:
java.lang.IllegalArgumentException - if pValue is not a known state identifier

equals

public boolean equals(java.lang.Object o)
equality check

Overrides:
equals in class java.lang.Object
Parameters:
o - object to test with
Returns:
boolean true to indicate equality, false otherwise

hashCode

public int hashCode()
get the hashcode of this object

Overrides:
hashCode in class java.lang.Object
Returns:
int hash code

toString

public java.lang.String toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.


Copyright © 2008. All Rights Reserved.