Class ThreadPoolStatsProvider
- java.lang.Object
-
- com.sun.enterprise.v3.services.impl.monitor.stats.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 StatsProviderThread Pool statistics- Author:
- Alexey Stashok
-
-
Field Summary
Fields Modifier and Type Field Description protected org.glassfish.external.statistics.impl.CountStatisticImplcoreThreadsCountprotected org.glassfish.external.statistics.impl.CountStatisticImplcurrentThreadCountprotected org.glassfish.external.statistics.impl.CountStatisticImplcurrentThreadsBusyprotected org.glassfish.external.statistics.impl.CountStatisticImplmaxThreadsCountprotected org.glassfish.grizzly.threadpool.ThreadPoolConfigthreadPoolConfigprotected static List<String>threadPoolNamesprotected org.glassfish.external.statistics.impl.CountStatisticImpltotalExecutedTasksCount
-
Constructor Summary
Constructors Constructor Description ThreadPoolStatsProvider(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.glassfish.external.statistics.CountStatisticgetCoreThreadsCount()org.glassfish.external.statistics.CountStatisticgetCurrentThreadCount()org.glassfish.external.statistics.CountStatisticgetCurrentThreadsBusy()org.glassfish.external.statistics.CountStatisticgetCurrentThreadUsage()org.glassfish.external.statistics.CountStatisticgetMaxThreadsCount()ObjectgetStatsObject()Get object, from which StatsProvider can get statistics directly without listening emitting events.org.glassfish.external.statistics.CountStatisticgetTotalExecutedTasksCount()voidreset()voidsetCoreThreadsEvent(String monitoringId, int coreNumberOfThreads)voidsetMaxThreadsEvent(String monitoringId, int maxNumberOfThreads)voidsetStatsObject(Object object)Set object, from which StatsProvider can get statistics directly without listening emitting events.voidthreadDispatchedFromPoolEvent(String monitoringId, long threadId)voidthreadReturnedToPoolEvent(String monitoringId, long threadId)voidunregisterThreadPool(String name)
-
-
-
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
-
-
Constructor Detail
-
ThreadPoolStatsProvider
public ThreadPoolStatsProvider(String name)
-
-
Method Detail
-
getStatsObject
public Object getStatsObject()
Description copied from interface:StatsProviderGet object, from which StatsProvider can get statistics directly without listening emitting events.- Specified by:
getStatsObjectin interfaceStatsProvider- Returns:
- statistics
-
setStatsObject
public void setStatsObject(Object object)
Description copied from interface:StatsProviderSet object, from which StatsProvider can get statistics directly without listening emitting events.- Specified by:
setStatsObjectin interfaceStatsProvider- 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)
-
-