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
  • Constructor Details

    • ExecutorStatistics

      public ExecutorStatistics(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor)
      Create a new statistics instance for the executor.
      Parameters:
      executor - The executor we're holding the statistics for.
  • Method Details

    • 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.