Class ThreadPoolStatsProvider

  • All Implemented Interfaces:
    StatsProvider
    Direct Known Subclasses:
    ThreadPoolStatsProviderGlobal

    @AMXMetadata(type="thread-pool-mon",
                 group="monitoring")
    @ManagedObject
    @Description("Thread Pool Statistics")
    public class ThreadPoolStatsProvider
    extends Object
    implements StatsProvider
    Thread Pool statistics
    Author:
    Alexey Stashok
    • Field Detail

      • maxThreadsCount

        protected final org.glassfish.external.statistics.impl.CountStatisticImpl maxThreadsCount
      • coreThreadsCount

        protected final org.glassfish.external.statistics.impl.CountStatisticImpl coreThreadsCount
      • totalExecutedTasksCount

        protected final org.glassfish.external.statistics.impl.CountStatisticImpl totalExecutedTasksCount
      • currentThreadCount

        protected final org.glassfish.external.statistics.impl.CountStatisticImpl currentThreadCount
      • currentThreadsBusy

        protected final org.glassfish.external.statistics.impl.CountStatisticImpl currentThreadsBusy
      • threadPoolConfig

        protected volatile org.glassfish.grizzly.threadpool.ThreadPoolConfig threadPoolConfig
      • threadPoolNames

        protected static volatile List<String> threadPoolNames
    • Constructor Detail

      • ThreadPoolStatsProvider

        public ThreadPoolStatsProvider​(String name)
    • Method Detail

      • getStatsObject

        public Object getStatsObject()
        Description copied from interface: StatsProvider
        Get object, from which StatsProvider can get statistics directly without listening emitting events.
        Specified by:
        getStatsObject in interface StatsProvider
        Returns:
        statistics
      • setStatsObject

        public void setStatsObject​(Object object)
        Description copied from interface: StatsProvider
        Set object, from which StatsProvider can get statistics directly without listening emitting events.
        Specified by:
        setStatsObject in interface StatsProvider
        Parameters:
        object - statistics
      • getMaxThreadsCount

        @ManagedAttribute(id="maxthreads")
        @Description("Maximum number of threads allowed in the thread pool")
        public org.glassfish.external.statistics.CountStatistic getMaxThreadsCount()
      • getCoreThreadsCount

        @ManagedAttribute(id="corethreads")
        @Description("Core number of threads in the thread pool")
        public org.glassfish.external.statistics.CountStatistic getCoreThreadsCount()
      • getTotalExecutedTasksCount

        @ManagedAttribute(id="totalexecutedtasks")
        @Description("Provides the total number of tasks, which were executed by the thread pool")
        public org.glassfish.external.statistics.CountStatistic getTotalExecutedTasksCount()
      • getCurrentThreadCount

        @ManagedAttribute(id="currentthreadcount")
        @Description("Provides the number of request processing threads currently in the listener thread pool")
        public org.glassfish.external.statistics.CountStatistic getCurrentThreadCount()
      • getCurrentThreadsBusy

        @ManagedAttribute(id="currentthreadsbusy")
        @Description("Provides the number of request processing threads currently in use in the listener thread pool serving requests.")
        public org.glassfish.external.statistics.CountStatistic getCurrentThreadsBusy()
      • getCurrentThreadUsage

        public org.glassfish.external.statistics.CountStatistic getCurrentThreadUsage()
      • setMaxThreadsEvent

        public void setMaxThreadsEvent​(String monitoringId,
                                       int maxNumberOfThreads)
      • setCoreThreadsEvent

        public void setCoreThreadsEvent​(String monitoringId,
                                        int coreNumberOfThreads)
      • threadDispatchedFromPoolEvent

        public void threadDispatchedFromPoolEvent​(String monitoringId,
                                                  long threadId)
      • threadReturnedToPoolEvent

        public void threadReturnedToPoolEvent​(String monitoringId,
                                              long threadId)
      • reset

        public void reset()
      • unregisterThreadPool

        public void unregisterThreadPool​(String name)