public static interface ThreadMonitor.ThreadListener
| Modifier and Type | Method and Description |
|---|---|
void |
executing(Collection<ThreadMonitor.ThreadExecutionState> states)
Callback method to notify a snapshot of the active threads in
execution.
|
void |
failed(ThreadMonitor.ThreadExecutionState state,
Exception failure)
Callback method to notify a thread has failed and the exception was
not caught.
|
void |
finished(ThreadMonitor.ThreadExecutionState state)
Callback method to notify a thread has finished execution.
|
void |
overlapped(ThreadMonitor.ThreadExecutionState state,
javax.measure.Measurable<javax.measure.quantity.Duration> period)
Callback method to notify when a
Runnable is submitted to
be executed at a fixed rate but it took more time to execute than
its period. |
void |
started(ThreadMonitor.ThreadExecutionState state)
Callback method to notify a thread has started execution.
|
void started(ThreadMonitor.ThreadExecutionState state)
Note: ThreadExecutionState's end time is updated by the executing thread, so by the moment the state is processed the thread might have finished execution.
state - thread execution statevoid finished(ThreadMonitor.ThreadExecutionState state)
state - thread execution statevoid executing(Collection<ThreadMonitor.ThreadExecutionState> states)
Note: ThreadExecutionState's end time is updated by the executing thread, so by the moment the state is processed the thread might have finished execution.
states - threads execution statesvoid overlapped(ThreadMonitor.ThreadExecutionState state, javax.measure.Measurable<javax.measure.quantity.Duration> period)
Runnable is submitted to
be executed at a fixed rate but it took more time to execute than
its period.state - thread execution stateperiod - period the Runnable was scheduled with.void failed(ThreadMonitor.ThreadExecutionState state, Exception failure)
state - thread execution statefailure - failureCopyright © 2014. All Rights Reserved.