Class ThreadPoolExecutorDelegate

    • Constructor Detail

      • ThreadPoolExecutorDelegate

        public ThreadPoolExecutorDelegate​(@Nonnull
                                          ThreadPoolExecutor delegate)
    • Method Detail

      • getLargestPoolSize

        public int getLargestPoolSize()
        Returns the largest number of threads that have ever simultaneously been in the pool.
        Specified by:
        getLargestPoolSize in interface ThreadPoolExecutorDelegateMBean
        Returns:
        the number of threads
      • getActiveCount

        public int getActiveCount()
        Returns the approximate number of threads that are actively executing tasks.
        Specified by:
        getActiveCount in interface ThreadPoolExecutorDelegateMBean
        Returns:
        the number of threads
      • getQueuedTaskCount

        public int getQueuedTaskCount()
        Returns the number of tasks that are currently waiting to be executed by the delegate executor.
        Specified by:
        getQueuedTaskCount in interface ThreadPoolExecutorDelegateMBean
        Returns:
        the task queue size
      • getQueueRemainingCapacity

        public int getQueueRemainingCapacity()
        Returns the number of additional elements that task queue used by the delegate executor can ideally (in the absence of memory or resource constraints) accept without blocking, or Integer.MAX_VALUE if there is no intrinsic limit.
        Specified by:
        getQueueRemainingCapacity in interface ThreadPoolExecutorDelegateMBean
        Returns:
        the remaining capacity
      • getTaskCount

        public long getTaskCount()
        Returns the approximate total number of tasks that have ever been scheduled for execution. Because the states of tasks and threads may change dynamically during computation, the returned value is only an approximation.
        Specified by:
        getTaskCount in interface ThreadPoolExecutorDelegateMBean
        Returns:
        the number of tasks
      • getCompletedTaskCount

        public long getCompletedTaskCount()
        Returns the approximate total number of tasks that have completed execution. Because the states of tasks and threads may change dynamically during computation, the returned value is only an approximation, but one that does not ever decrease across successive calls.
        Specified by:
        getCompletedTaskCount in interface ThreadPoolExecutorDelegateMBean
        Returns:
        the number of tasks