public interface MonitorableTaskExecutor extends ContextAwareTaskExecutor
TaskExecutor which is able to provide a few statistical
information about the currently queued tasks. This information cannot be used
for synchronization purposes and should be considered unreliable. However,
you can base some decision on these methods: For example, if the
number of queued tasks exceed a predefined
constant, you may decide to schedule tasks slower to the executor.
| Modifier and Type | Method and Description |
|---|---|
long |
getNumberOfExecutingTasks()
Returns the approximate number of tasks currently being executed.
|
long |
getNumberOfQueuedTasks()
Returns the approximate number of tasks currently queued to this
executor.
|
isExecutingInThisexecute, execute, executeFunction, executeStagedlong getNumberOfQueuedTasks()
Note that the value returned by this method should be considered unreliable and cannot be used for synchronization purposes.
long getNumberOfExecutingTasks()
Note that the value returned by this method should be considered unreliable and cannot be used for synchronization purposes.