Class MonitoredQueuedThreadPool

    • Constructor Detail

      • MonitoredQueuedThreadPool

        public MonitoredQueuedThreadPool()
      • MonitoredQueuedThreadPool

        public MonitoredQueuedThreadPool​(int maxThreads)
      • MonitoredQueuedThreadPool

        public MonitoredQueuedThreadPool​(int maxThreads,
                                         int minThreads,
                                         int idleTimeOut,
                                         java.util.concurrent.BlockingQueue<java.lang.Runnable> queue)
    • Method Detail

      • execute

        public void execute​(java.lang.Runnable job)
        Specified by:
        execute in interface java.util.concurrent.Executor
        Specified by:
        execute in interface TryExecutor
        Overrides:
        execute in class QueuedThreadPool
      • getTasks

        @ManagedAttribute("the number of tasks executed")
        public long getTasks()
        Returns:
        the number of tasks executed
      • getMaxBusyThreads

        @ManagedAttribute("the maximum number of busy threads")
        public int getMaxBusyThreads()
        Returns:
        the maximum number of busy threads
      • getMaxQueueSize

        @ManagedAttribute("the maximum task queue size")
        public int getMaxQueueSize()
        Returns:
        the maximum task queue size
      • getAverageQueueLatency

        @ManagedAttribute("the average time a task remains in the queue, in nanoseconds")
        public long getAverageQueueLatency()
        Returns:
        the average time a task remains in the queue, in nanoseconds
      • getMaxQueueLatency

        @ManagedAttribute("the maximum time a task remains in the queue, in nanoseconds")
        public long getMaxQueueLatency()
        Returns:
        the maximum time a task remains in the queue, in nanoseconds
      • getAverageTaskLatency

        @ManagedAttribute("the average task execution time, in nanoseconds")
        public long getAverageTaskLatency()
        Returns:
        the average task execution time, in nanoseconds
      • getMaxTaskLatency

        @ManagedAttribute("the maximum task execution time, in nanoseconds")
        public long getMaxTaskLatency()
        Returns:
        the maximum task execution time, in nanoseconds