org.glassfish.grizzly.threadpool.jmx
Class ThreadPool
java.lang.Object
org.glassfish.grizzly.monitoring.jmx.JmxObject
org.glassfish.grizzly.threadpool.jmx.ThreadPool
@ManagedObject
@Description(value="Grizzly ThreadPool (typically shared between Transport instances).")
public class ThreadPool
- extends JmxObject
JMX managed object for Grizzly thread pool implementations.
- Since:
- 2.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadPool
public ThreadPool(AbstractThreadPool threadPool)
getJmxName
public java.lang.String getJmxName()
- Specified by:
getJmxName in class JmxObject
- Returns:
- the name this managed object should be registered with.
onRegister
protected void onRegister(GrizzlyJmxManager mom,
org.glassfish.gmbal.GmbalMBean bean)
- Method will be called right after this JmxObject is registered by the JMX manager.
- Specified by:
onRegister in class JmxObject
- Parameters:
mom - GrizzlyJmxManager Grizzly JMX manager.bean - GmbalMBean, which represents the registration.
onDeregister
protected void onDeregister(GrizzlyJmxManager mom)
- Method will be called right after this JmxObject is unregistered by the JMX manager.
- Specified by:
onDeregister in class JmxObject
- Parameters:
mom - GrizzlyJmxManager Grizzly JMX manager.
getPoolType
@ManagedAttribute(id="thread-pool-type")
@Description(value="The Java type of the thread pool implementation being used.")
public java.lang.String getPoolType()
- Returns:
- the Java type of the managed thread pool.
isStarted
@ManagedAttribute(id="thread-pool-started")
@Description(value="Indiciates whether or not the thread pool has been started.")
public boolean isStarted()
- Returns:
true if this pool has been started, otherwise return
false
getMaxAllowedThreads
@ManagedAttribute(id="thread-pool-max-num-threads")
@Description(value="The maximum number of the threads allowed by this thread pool.")
public int getMaxAllowedThreads()
- Returns:
- the max number of threads allowed by this thread pool.
getCorePoolSize
@ManagedAttribute(id="thread-pool-core-pool-size")
@Description(value="The initial/minimum number of threads managed by this thread pool.")
public int getCorePoolSize()
- Returns:
- the core size of this thread pool.
getCurrentAllocatedThreadCount
@ManagedAttribute(id="thread-pool-allocated-thread-count")
@Description(value="The current number of threads managed by this thread pool.")
public int getCurrentAllocatedThreadCount()
- Returns:
- the current number of threads maintained by this thread pool.
getTotalAllocatedThreadCount
@ManagedAttribute(id="thread-pool-total-allocated-thread-count")
@Description(value="The total number of threads allocated during the lifetime of this thread pool.")
public int getTotalAllocatedThreadCount()
- Returns:
- the total number of threads that have been allocated over time
by this thread pool.
getCurrentTaskCount
@ManagedAttribute(id="thread-pool-queued-task-count")
@Description(value="The number of tasks currently being processed by this thread pool.")
public int getCurrentTaskCount()
- Returns:
- the current number of tasks that have been queued for processing
by this thread pool.
getTotalCompletedTasksCount
@ManagedAttribute(id="thread-pool-total-completed-tasks-count")
@Description(value="The total number of tasks that have been processed by this thread pool.")
public long getTotalCompletedTasksCount()
- Returns:
- the total number of tasks that have been completed by this
thread pool.
getTotalTaskQueueOverflowCount
@ManagedAttribute(id="thread-pool-task-queue-overflow-count")
@Description(value="The total number of times the task queue of this thread pool has been saturated.")
public int getTotalTaskQueueOverflowCount()
- Returns:
- the number of times the task queue has reached it's upper limit.
Copyright © 2011 Oracle Corpration. All Rights Reserved.