|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.basher.TaskExecutionContext
public class TaskExecutionContext
Holder class for a Task
and TaskConfiguration
combination. Class also manages basic
statistics for the invocation of a class, such as invocation counts etc.
Constructor Summary | |
---|---|
TaskExecutionContext(Task task)
Deprecated. |
|
TaskExecutionContext(UUID identifier,
Task task,
TaskConfiguration taskConfiguration)
Creates a new TaskExecutionContext , wrapping the specified task and task configuration. |
Method Summary | |
---|---|
void |
addFollower(TaskExecutionContext taskExecutionContext)
|
void |
clearFollowers()
|
boolean |
equals(Object o)
|
void |
executeTask()
Main method that should be called by the component that executes tasks. |
int |
getFailures()
Retrieves the number of failed invocation of the embedded task. |
Set<TaskExecutionContext> |
getFollowers()
|
UUID |
getIdentifier()
|
int |
getInvocations()
Retrieves the number of times this task was invoked (successes+failures). |
int |
getNotRun()
Retrieves the number times the task chose to not run. |
int |
getSuccesses()
Retrieves the number of successful invocations of the embedded task. |
Task |
getTask()
Retrieves the task embedded in this TaskExecutionContext . |
TaskConfiguration |
getTaskConfiguration()
|
int |
hashCode()
|
void |
releaseInvocation()
|
void |
reserveInvocation()
|
void |
setIdentifier(UUID identifier)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TaskExecutionContext(Task task)
task
- public TaskExecutionContext(UUID identifier, Task task, TaskConfiguration taskConfiguration)
TaskExecutionContext
, wrapping the specified task and task configuration.
identifier
- Identifier of the context, used for referencing this contexttask
- The task to wraptaskConfiguration
- The configuration of the taskMethod Detail |
---|
public Task getTask()
TaskExecutionContext
.
public TaskConfiguration getTaskConfiguration()
public int getFailures()
public int getSuccesses()
public int getNotRun()
NotRunException
for this counter to be incremented.
public void reserveInvocation()
public void releaseInvocation()
public int getInvocations()
public void executeTask() throws Throwable
Throwable
- Any exception thrown by the embedded task when invoking the executeTask
method are
re-thrown by this method.public UUID getIdentifier()
public void setIdentifier(UUID identifier)
public void addFollower(TaskExecutionContext taskExecutionContext)
public void clearFollowers()
public Set<TaskExecutionContext> getFollowers()
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |