|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Collector
Defines the operations required for collecting statistical information about the running tasks.
| Method Summary | |
|---|---|
void |
fail(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos,
Throwable throwable)
Reports a task's failure to run together with the time time elapsed for the failure. |
List<Average> |
getAverages()
Retrieves the list of averages calculated over time. |
long |
getFailures()
Retrieves the total number of failures recorded. |
long |
getNotRun()
Retrieves the total number of tasks that didn't wish to run |
long |
getSuccesses()
Retrieves the total number of successes recorded. |
long |
getTotal()
Retrieves the total number of tasks that were recorded (essentially successes+failures). |
boolean |
isCollecting()
Checks if the collector is currently collecting statistics. |
Average |
markAverage()
Informs the collector that a collection period has finished. |
void |
notRun(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos)
Reports a task's wish to not run altogether with the time time elapsed for it to determine this. |
void |
startCollecting()
Signals to the collector that statistics collection should start. |
void |
stopCollecting()
Signals to the collector that collection should stop. |
void |
success(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos)
Reports a task's successful invocation together with the time elapsed for the task to run. |
| Method Detail |
|---|
void startCollecting()
void stopCollecting()
boolean isCollecting()
void success(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos)
taskExecutionContext - The task execution context wrapping the Task that was invokedelapsedTime - The time it took for the task to runelapsedTimeNanos -
void fail(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos,
Throwable throwable)
taskExecutionContext - The task execution context wrapping the Task that failedelapsedTime - The time it took for the task to run and fail.elapsedTimeNanos - throwable - The cause of the failure. This may be null if the cause of the failure is not an exception.long getFailures()
long getSuccesses()
long getTotal()
Average markAverage()
List<Average> getAverages()
Average instances.
void notRun(TaskExecutionContext taskExecutionContext,
long elapsedTime,
long elapsedTimeNanos)
taskExecutionContext - The task execution context wrapping the Task that didn't wish to runelapsedTime - The time it took for the task to run and determine it didn't want to runelapsedTimeNanos - long getNotRun()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||