public interface TaskContext
| Modifier and Type | Method and Description |
|---|---|
void |
addDuration(java.lang.String name,
double duration)
On each call, the value is added to the existing duration value for the given name.
|
void |
addDuration(java.lang.String name,
long duration)
On each call, the value is added to the existing duration value for the given name.
|
void |
addToCounter(java.lang.String name,
double value)
On each call, the value is added to the existing counter value for the given name.
|
void |
addToCounter(java.lang.String name,
long value)
On each call, the value is added to the existing counter value for the given name.
|
void |
cancel()
cancel task execution.
|
java.util.Map<java.lang.String,java.lang.Number> |
getFinalCounters() |
Inputs |
getInputs() |
TaskLog |
getLog() |
ObjectStoreService |
getObjectStore() |
Outputs |
getOutputs() |
Task |
getTask() |
AnyMap |
getTaskParameters() |
long |
getTimestamp() |
boolean |
isCanceled() |
void |
measureTime(java.lang.String name,
long startTime)
measure time that has elapsed since the startTime value and add the duration to the named counter.
|
Task getTask()
AnyMap getTaskParameters()
Inputs getInputs()
Outputs getOutputs()
java.util.Map<java.lang.String,java.lang.Number> getFinalCounters()
long getTimestamp()
measureTime(String, long) to measure a duration.void measureTime(java.lang.String name,
long startTime)
name - the name of the counterstartTime - the start timevoid addDuration(java.lang.String name,
long duration)
name - the name of the counterduration - the duration in nanoseconds to add.void addDuration(java.lang.String name,
double duration)
name - the name of the counterduration - the duration in seconds to add.void addToCounter(java.lang.String name,
long value)
name - the name of the countervalue - the value to add to the countervoid addToCounter(java.lang.String name,
double value)
name - the name of the countervalue - the value to add to the counterboolean isCanceled()
true if current task is canceled, false otherwise.void cancel()
ObjectStoreService getObjectStore()
TaskLog getLog()