Class ExecutorStatistics
- java.lang.Object
-
- org.hawaiiframework.async.statistics.ExecutorStatistics
-
public class ExecutorStatistics extends Object
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
- Author:
- Rutger Lubbers
-
-
Constructor Summary
Constructors Constructor Description ExecutorStatistics(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor)
Create a new statistics instance for theexecutor
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getAbortedTaskCount()
Get the number of aborted tasks.Long
getCompletedTaskCount()
Get the number of completed tasks.Integer
getMaxPoolSize()
Get the executor's max pool size.Integer
getPoolSize()
Get the executor's pool size.Integer
getQueueSize()
Get the executor's queued task size.void
incrementAbortedTaskCount()
Increase the number of aborted tasks.
-
-
-
Method Detail
-
incrementAbortedTaskCount
public void incrementAbortedTaskCount()
Increase the number of aborted tasks.
-
getPoolSize
public Integer getPoolSize()
Get the executor's pool size.- Returns:
- The current number of threads in use by the executor.
-
getMaxPoolSize
public Integer getMaxPoolSize()
Get the executor's max pool size.- Returns:
- The executor's max pool size.
-
getQueueSize
public Integer getQueueSize()
Get the executor's queued task size.- Returns:
- The number of queued tasks.
-
getCompletedTaskCount
public Long getCompletedTaskCount()
Get the number of completed tasks.- Returns:
- The executor's completed task count.
-
getAbortedTaskCount
public Long getAbortedTaskCount()
Get the number of aborted tasks.- Returns:
- The executor's aborted task count.
-
-