Class ExecutorStatistics
java.lang.Object
org.hawaiiframework.async.statistics.ExecutorStatistics
Executor statistics.
The executor statistics contain the number of threads used, the maximum number configured, the queued task count, the executed task count and the aborted task count.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionExecutorStatistics(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor) Create a new statistics instance for theexecutor. -
Method Summary
Modifier and TypeMethodDescriptionGet the number of aborted tasks.Get the number of completed tasks.Get the executor's max pool size.Get the executor's pool size.Get the executor's queued task size.voidIncrease the number of aborted tasks.
-
Constructor Details
-
ExecutorStatistics
public ExecutorStatistics(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor) Create a new statistics instance for theexecutor.- Parameters:
executor- The executor we're holding the statistics for.
-
-
Method Details
-
incrementAbortedTaskCount
public void incrementAbortedTaskCount()Increase the number of aborted tasks. -
getPoolSize
Get the executor's pool size.- Returns:
- The current number of threads in use by the executor.
-
getMaxPoolSize
Get the executor's max pool size.- Returns:
- The executor's max pool size.
-
getQueueSize
Get the executor's queued task size.- Returns:
- The number of queued tasks.
-
getCompletedTaskCount
Get the number of completed tasks.- Returns:
- The executor's completed task count.
-
getAbortedTaskCount
Get the number of aborted tasks.- Returns:
- The executor's aborted task count.
-