public class ThreadExecutorStatsMXBeanImpl extends AbstractMXBean implements ThreadExecutorStatsMXBean
ExecutorService.BASE_JMX_PREFIX| Constructor and Description |
|---|
ThreadExecutorStatsMXBeanImpl(ThreadPoolExecutor executor,
String beanName,
String beanType,
@Nullable String beanCategory)
Constructs an instance for the given
Executor. |
| Modifier and Type | Method and Description |
|---|---|
static ThreadExecutorStatsMXBeanImpl |
create(Executor executor)
Creates a new bean if the backing executor is a ThreadPoolExecutor.
|
static ThreadExecutorStatsMXBeanImpl |
create(Executor executor,
String beanName,
String beanType)
Creates a new bean if the backing executor is a ThreadPoolExecutor and registers it.
|
static ThreadExecutorStatsMXBeanImpl |
create(Executor executor,
String beanName,
String beanType,
@Nullable String beanCategory)
Creates a new bean if the backing executor is a ThreadPoolExecutor and registers it.
|
long |
getActiveThreadCount()
Returns the active thread count.
|
long |
getCompletedTaskCount()
Returns the completed task count.
|
long |
getCurrentQueueSize()
Returns the current queue size.
|
long |
getCurrentThreadPoolSize()
Returns the current thread pool size.
|
Long |
getLargestQueueSize()
Returns the largest queue size, if available.
|
long |
getLargestThreadPoolSize()
Returns the largest thread pool size.
|
long |
getMaxQueueSize()
Returns the maximum queue size.
|
long |
getMaxThreadPoolSize()
Returns the maximum thread pool size.
|
Long |
getRejectedTaskCount()
Returns the rejected task count, if available.
|
long |
getTotalTaskCount()
Returns the total task count.
|
ThreadExecutorStats |
toThreadExecutorStats()
Returns a
ThreadExecutorStats instance containing a snapshot of the statistic
metrics. |
getMBeanCategory, getMBeanName, getMBeanType, register, registerMBean, unregister, unregisterMBeanpublic ThreadExecutorStatsMXBeanImpl(ThreadPoolExecutor executor, String beanName, String beanType, @Nullable String beanCategory)
Executor.executor - the backing ExecutorbeanName - Used as the name property in the bean's ObjectName.beanType - Used as the type property in the bean's ObjectName.beanCategory - Used as the Category property in the bean's ObjectName.public static ThreadExecutorStatsMXBeanImpl create(Executor executor, String beanName, String beanType, @Nullable String beanCategory)
executor - the backing ExecutorbeanName - Used as the name property in the bean's ObjectName.beanType - Used as the type property in the bean's ObjectName.beanCategory - Used as the Category property in the bean's ObjectName.public static ThreadExecutorStatsMXBeanImpl create(Executor executor, String beanName, String beanType)
executor - the backing ExecutorbeanName - Used as the name property in the bean's ObjectName.beanType - Used as the type property in the bean's ObjectName.public static ThreadExecutorStatsMXBeanImpl create(Executor executor)
executor - the backing Executorpublic long getCurrentThreadPoolSize()
ThreadExecutorStatsMXBeangetCurrentThreadPoolSize in interface ThreadExecutorStatsMXBeanpublic long getLargestThreadPoolSize()
ThreadExecutorStatsMXBeangetLargestThreadPoolSize in interface ThreadExecutorStatsMXBeanpublic long getMaxThreadPoolSize()
ThreadExecutorStatsMXBeangetMaxThreadPoolSize in interface ThreadExecutorStatsMXBeanpublic long getCurrentQueueSize()
ThreadExecutorStatsMXBeangetCurrentQueueSize in interface ThreadExecutorStatsMXBeanpublic Long getLargestQueueSize()
ThreadExecutorStatsMXBeangetLargestQueueSize in interface ThreadExecutorStatsMXBeanpublic long getMaxQueueSize()
ThreadExecutorStatsMXBeangetMaxQueueSize in interface ThreadExecutorStatsMXBeanpublic long getActiveThreadCount()
ThreadExecutorStatsMXBeangetActiveThreadCount in interface ThreadExecutorStatsMXBeanpublic long getCompletedTaskCount()
ThreadExecutorStatsMXBeangetCompletedTaskCount in interface ThreadExecutorStatsMXBeanpublic long getTotalTaskCount()
ThreadExecutorStatsMXBeangetTotalTaskCount in interface ThreadExecutorStatsMXBeanpublic Long getRejectedTaskCount()
ThreadExecutorStatsMXBeangetRejectedTaskCount in interface ThreadExecutorStatsMXBeanpublic ThreadExecutorStats toThreadExecutorStats()
ThreadExecutorStats instance containing a snapshot of the statistic
metrics.Copyright © 2019 OpenDaylight. All rights reserved.