|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
An ExecutionHandle allows an
application to monitor or terminate a task, as
well as wait for the completion of a task. An
instance of ExecutionHandle is
created when a mining task is executed in the DME.
The start time is when the state changes to
executing.
| Method Summary | |
boolean |
containsWarning()
Returns true if there were any warnings during the execution. |
java.lang.Integer |
getDurationInSeconds()
Returns the duration of execution for the associated task in the unit of seconds. |
ExecutionStatus |
getLatestStatus()
Returns the latest ExecutionStatus for the task. |
java.util.Date |
getStartTime()
Returns the time stamp when task execution began. |
java.util.Collection |
getStatus(java.util.Date fromTimestamp)
Returns a collection containing a time-ordered set of ExecutionStatus instances since the specified timestamp. |
java.lang.String |
getTaskName()
Returns the name of the task associated with the execution handle. |
ExecutionStatus[] |
getWarnings()
Returns an array of ExecutionStatus objects that contain warnings. |
ExecutionStatus |
terminate()
Issues an asychronous termination request for the executing task. |
ExecutionStatus |
waitForCompletion(int timeoutInSeconds)
Waits synchronoulsy within the specified time until the task associated with the handle completes successfully, as a result of termination, or in error. |
| Method Detail |
public boolean containsWarning()
throws JDMException
JDMException
public java.lang.Integer getDurationInSeconds()
throws JDMException
JDMException
public ExecutionStatus getLatestStatus()
throws JDMException
ExecutionStatus for the task.
JDMException
public java.util.Date getStartTime()
throws JDMException
ExecutionState is submitted, then it returns null.
JDMException
public java.util.Collection getStatus(java.util.Date fromTimestamp)
throws JDMException
ExecutionStatus instances since the specified timestamp. The ordering is from most recent first. If the timestamp is null, it returns the complete history available of ExecutionStatus instances.
A vendor may choose to keep only a subset of the status objects, from the most recent.
fromTimestamp -
JDMExceptionpublic java.lang.String getTaskName()
public ExecutionStatus[] getWarnings()
throws JDMException
ExecutionStatus objects that contain warnings. If the method containsWarnings returns false, this method returns null.
JDMException
public ExecutionStatus terminate()
throws JDMException
ExecutionStatus instance when the termination signal was delivered.
If the task already completed, successfully or in error, an exception is thrown.
JDMException
public ExecutionStatus waitForCompletion(int timeoutInSeconds)
throws JDMException
Integer.MAX_VALUE, the method waits until completion. The method returns the last execution status.
timeoutInSeconds - The timeout in seconds.
JDMException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||