public class HystrixThreadPoolMetrics extends HystrixMetrics
HystrixThreadPool to record metrics.countergetCumulativeCount, getRollingCountpublic static HystrixThreadPoolMetrics getInstance(HystrixThreadPoolKey key, ThreadPoolExecutor threadPool, HystrixThreadPoolProperties properties)
HystrixThreadPoolMetrics instance for a given HystrixThreadPoolKey.
This is thread-safe and ensures only 1 HystrixThreadPoolMetrics per HystrixThreadPoolKey.
key - HystrixThreadPoolKey of HystrixThreadPool instance requesting the HystrixThreadPoolMetricsthreadPool - Pass-thru of ThreadPoolExecutor to HystrixThreadPoolMetrics instance on first time when constructedproperties - Pass-thru to HystrixThreadPoolMetrics instance on first time when constructedHystrixThreadPoolMetricspublic static HystrixThreadPoolMetrics getInstance(HystrixThreadPoolKey key)
HystrixThreadPoolMetrics instance for a given HystrixThreadPoolKey or null if one does not exist.key - HystrixThreadPoolKey of HystrixThreadPool instance requesting the HystrixThreadPoolMetricsHystrixThreadPoolMetricspublic static Collection<HystrixThreadPoolMetrics> getInstances()
HystrixThreadPoolMetricsCollection<HystrixThreadPoolMetrics>public ThreadPoolExecutor getThreadPool()
ThreadPoolExecutor this executor represents.public HystrixThreadPoolKey getThreadPoolKey()
HystrixThreadPoolKey these metrics represent.public HystrixThreadPoolProperties getProperties()
HystrixThreadPoolProperties of the HystrixThreadPool these metrics represent.public Number getCurrentActiveCount()
ThreadPoolExecutor.getActiveCount()public Number getCurrentCompletedTaskCount()
ThreadPoolExecutor.getCompletedTaskCount()public Number getCurrentCorePoolSize()
ThreadPoolExecutor.getCorePoolSize()public Number getCurrentLargestPoolSize()
ThreadPoolExecutor.getLargestPoolSize()public Number getCurrentMaximumPoolSize()
ThreadPoolExecutor.getMaximumPoolSize()public Number getCurrentPoolSize()
ThreadPoolExecutor.getPoolSize()public Number getCurrentTaskCount()
ThreadPoolExecutor.getTaskCount()public Number getCurrentQueueSize()
BlockingQueue used by the thread-poolpublic void markThreadExecution()
public long getRollingCountThreadsExecuted()
The rolling window is defined by HystrixThreadPoolProperties.metricsRollingStatisticalWindowInMilliseconds().
public long getCumulativeCountThreadsExecuted()
public void markThreadCompletion()
public long getRollingMaxActiveThreads()
The rolling window is defined by HystrixThreadPoolProperties.metricsRollingStatisticalWindowInMilliseconds().
public void markThreadRejection()
Copyright © 2015. All Rights Reserved.