|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.taskworker.internal.TaskContextImpl
public class TaskContextImpl
Implementation of TaskContext.
| Constructor Summary | |
|---|---|
TaskContextImpl(Task task,
TaskLog taskLog,
ObjectStoreService objectStore)
create instance. |
|
TaskContextImpl(Task task,
TaskLog taskLog,
ObjectStoreService objectStore,
java.util.Map<java.lang.String,java.util.Collection<OutputMode>> outputModes)
create instance. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TaskContextImpl(Task task,
TaskLog taskLog,
ObjectStoreService objectStore)
public TaskContextImpl(Task task,
TaskLog taskLog,
ObjectStoreService objectStore,
java.util.Map<java.lang.String,java.util.Collection<OutputMode>> outputModes)
| Method Detail |
|---|
public Task getTask()
getTask in interface TaskContextpublic AnyMap getTaskParameters()
getTaskParameters in interface TaskContextpublic Inputs getInputs()
getInputs in interface TaskContextpublic Outputs getOutputs()
getOutputs in interface TaskContextpublic java.util.Map<java.lang.String,java.lang.Number> getFinalCounters()
getFinalCounters in interface TaskContext
public void addToCounter(java.lang.String name,
long value)
TaskContext
addToCounter in interface TaskContextname - the name of the countervalue - the value to add to the counter
public void addToCounter(java.lang.String name,
double value)
TaskContext
addToCounter in interface TaskContextname - the name of the countervalue - the value to add to the counterpublic long getTimestamp()
getTimestamp in interface TaskContextTaskContext.measureTime(String, long) to measure a duration.
public void measureTime(java.lang.String name,
long startTime)
TaskContext
measureTime in interface TaskContextname - the name of the counterstartTime - the start time
public void addDuration(java.lang.String name,
long duration)
TaskContext
addDuration in interface TaskContextname - the name of the counterduration - the duration in nanoseconds to add.
public void addDuration(java.lang.String name,
double duration)
TaskContext
addDuration in interface TaskContextname - the name of the counterduration - the duration in seconds to add.public boolean isCanceled()
isCanceled in interface TaskContexttrue if current task is canceled, false otherwise.public void cancel()
cancel in interface TaskContextpublic ObjectStoreService getObjectStore()
getObjectStore in interface TaskContextpublic TaskLog getLog()
getLog in interface TaskContext
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||