Class Status
- java.lang.Object
-
- org.griphyn.vdl.Chimera
-
- edu.isi.pegasus.planner.invocation.Invocation
-
- edu.isi.pegasus.planner.invocation.Status
-
- All Implemented Interfaces:
java.io.Serializable
public class Status extends Invocation
This class encapsulates the exit code or reason of termination for a given job. The class itself contains the raw exit code. It also aggregates an instance of the JobStatus interface, which describes more clearly failure, regular execution, signal and suspension.- Version:
- $Revision$
- Author:
- Jens-S. Vöckler, Yong Zhao
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private JobStatus
m_jobStatus
This member variable contains the real status of the job.private int
m_status
The raw exit code, unparsed and unprepared.
-
Constructor Summary
Constructors Constructor Description Status()
Default c'tor: Construct a hollow shell and allow further information to be added later.Status(int raw)
Constructs a layer with the raw exit code.Status(int raw, JobStatus status)
Constructs the complete class with raw exit code and a status child describing the exit code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobStatus
getJobStatus()
Accessorint
getStatus()
Accessorvoid
setJobStatus(JobStatus jobStatus)
Accessor.void
setStatus(int status)
Accessor.void
toString(java.io.Writer stream)
Converts the active state into something meant for human consumption.void
toXML(java.io.Writer stream, java.lang.String indent, java.lang.String namespace)
Dump the state of the current element as XML output.
-
-
-
Field Detail
-
m_status
private int m_status
The raw exit code, unparsed and unprepared. There are several interpretation of the value. Usually, it is interpreted as unsigned 16 bit value. The high byte contains the exit code. The low byte has the core dump flag as MSB, and the rest denote the signal number. A value of -1 denotes a failure from the grid launcher before starting the job.
-
m_jobStatus
private JobStatus m_jobStatus
This member variable contains the real status of the job.
-
-
Constructor Detail
-
Status
public Status()
Default c'tor: Construct a hollow shell and allow further information to be added later.
-
Status
public Status(int raw)
Constructs a layer with the raw exit code.- Parameters:
raw
- is the raw exit code to store.
-
Status
public Status(int raw, JobStatus status)
Constructs the complete class with raw exit code and a status child describing the exit code.- Parameters:
raw
- is the raw exit statusstatus
- is the description of the kind of exit.
-
-
Method Detail
-
getStatus
public int getStatus()
Accessor- See Also:
setStatus(int)
-
setStatus
public void setStatus(int status)
Accessor.- Parameters:
status
-- See Also:
getStatus()
-
getJobStatus
public JobStatus getJobStatus()
Accessor- See Also:
setJobStatus( JobStatus )
-
setJobStatus
public void setJobStatus(JobStatus jobStatus)
Accessor.- Parameters:
jobStatus
- is an instance of the class describing the real reason for program termination on the remote end.- See Also:
getJobStatus()
-
toString
public void toString(java.io.Writer stream) throws java.io.IOException
Converts the active state into something meant for human consumption. The method will be called when recursively traversing the instance tree.- Specified by:
toString
in classorg.griphyn.vdl.Chimera
- Parameters:
stream
- is a stream opened and ready for writing. This can also be a string stream for efficient output.- Throws:
java.io.IOException
- if something fishy happens to the stream.
-
toXML
public void toXML(java.io.Writer stream, java.lang.String indent, java.lang.String namespace) throws java.io.IOException
Dump the state of the current element as XML output. This function traverses all sibling classes as necessary, and converts the data into pretty-printed XML output. The stream interface should be able to handle large output efficiently.- Specified by:
toXML
in classorg.griphyn.vdl.Chimera
- Parameters:
stream
- is a stream opened and ready for writing. This can also be a string stream for efficient output.indent
- is aString
of spaces used for pretty printing. The initial amount of spaces should be an empty string. The parameter is used internally for the recursive traversal. If anull
value is specified, no indentation nor linefeeds will be generated.namespace
- is the XML schema namespace prefix. If neither empty nor null, each element will be prefixed with this prefix, and the root element will map the XML namespace.- Throws:
java.io.IOException
- if something fishy happens to the stream.- See Also:
BufferedWriter
-
-