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 StatsProvider
Thread Pool statistics- Author:
- Alexey Stashok
-
-
Field Summary
Fields Modifier and Type Field Description protected org.glassfish.external.statistics.impl.CountStatisticImpl
coreThreadsCount
protected org.glassfish.external.statistics.impl.CountStatisticImpl
currentThreadCount
protected org.glassfish.external.statistics.impl.CountStatisticImpl
currentThreadsBusy
protected org.glassfish.external.statistics.impl.CountStatisticImpl
maxThreadsCount
protected org.glassfish.grizzly.threadpool.ThreadPoolConfig
threadPoolConfig
protected static List<String>
threadPoolNames
protected org.glassfish.external.statistics.impl.CountStatisticImpl
totalExecutedTasksCount
-
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.CountStatistic
getCoreThreadsCount()
org.glassfish.external.statistics.CountStatistic
getCurrentThreadCount()
org.glassfish.external.statistics.CountStatistic
getCurrentThreadsBusy()
org.glassfish.external.statistics.CountStatistic
getCurrentThreadUsage()
org.glassfish.external.statistics.CountStatistic
getMaxThreadsCount()
Object
getStatsObject()
Get object, from which StatsProvider can get statistics directly without listening emitting events.org.glassfish.external.statistics.CountStatistic
getTotalExecutedTasksCount()
void
reset()
void
setCoreThreadsEvent(String monitoringId, int coreNumberOfThreads)
void
setMaxThreadsEvent(String monitoringId, int maxNumberOfThreads)
void
setStatsObject(Object object)
Set object, from which StatsProvider can get statistics directly without listening emitting events.void
threadDispatchedFromPoolEvent(String monitoringId, long threadId)
void
threadReturnedToPoolEvent(String monitoringId, long threadId)
void
unregisterThreadPool(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:StatsProvider
Get object, from which StatsProvider can get statistics directly without listening emitting events.- Specified by:
getStatsObject
in interfaceStatsProvider
- 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 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)
-
-