com.sun.enterprise.v3.services.impl.monitor.stats
Class ThreadPoolStatsProvider

java.lang.Object
  extended by 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(value="Thread Pool Statistics")
public class ThreadPoolStatsProvider
extends Object
implements StatsProvider

Thread Pool statistics

Author:
Alexey Stashok

Field Summary
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  org.glassfish.external.statistics.impl.CountStatisticImpl totalExecutedTasksCount
           
 
Constructor Summary
ThreadPoolStatsProvider(String name)
           
 
Method Summary
 org.glassfish.external.statistics.CountStatistic getCoreThreadsCount()
           
 org.glassfish.external.statistics.CountStatistic getCurrentThreadCount()
           
 org.glassfish.external.statistics.CountStatistic getCurrentThreadsBusy()
           
 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, String threadPoolName, int coreNumberOfThreads)
           
 void setMaxThreadsEvent(String monitoringId, String threadPoolName, int maxNumberOfThreads)
           
 void setStatsObject(Object object)
          Set object, from which StatsProvider can get statistics directly without listening emitting events.
 void threadAllocatedEvent(String monitoringId, String threadPoolName, long threadId)
           
 void threadDispatchedFromPoolEvent(String monitoringId, String threadPoolName, long threadId)
           
 void threadReleasedEvent(String monitoringId, String threadPoolName, long threadId)
           
 void threadReturnedToPoolEvent(String monitoringId, String threadPoolName, long threadId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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(value="Maximum number of threads allowed in the thread pool")
public org.glassfish.external.statistics.CountStatistic getMaxThreadsCount()

getCoreThreadsCount

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

getTotalExecutedTasksCount

@ManagedAttribute(id="totalexecutedtasks")
@Description(value="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(value="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(value="Provides the number of request processing threads currently in use in the listener thread pool serving requests.")
public org.glassfish.external.statistics.CountStatistic getCurrentThreadsBusy()

setMaxThreadsEvent

public void setMaxThreadsEvent(String monitoringId,
                               String threadPoolName,
                               int maxNumberOfThreads)

setCoreThreadsEvent

public void setCoreThreadsEvent(String monitoringId,
                                String threadPoolName,
                                int coreNumberOfThreads)

threadAllocatedEvent

public void threadAllocatedEvent(String monitoringId,
                                 String threadPoolName,
                                 long threadId)

threadReleasedEvent

public void threadReleasedEvent(String monitoringId,
                                String threadPoolName,
                                long threadId)

threadDispatchedFromPoolEvent

public void threadDispatchedFromPoolEvent(String monitoringId,
                                          String threadPoolName,
                                          long threadId)

threadReturnedToPoolEvent

public void threadReturnedToPoolEvent(String monitoringId,
                                      String threadPoolName,
                                      long threadId)

reset

public void reset()


Copyright © 2012. All Rights Reserved.