Package com.codahale.metrics.jvm
Class CachedThreadStatesGaugeSet
- java.lang.Object
-
- com.codahale.metrics.jvm.ThreadStatesGaugeSet
-
- com.codahale.metrics.jvm.CachedThreadStatesGaugeSet
-
- All Implemented Interfaces:
com.codahale.metrics.Metric
,com.codahale.metrics.MetricSet
public class CachedThreadStatesGaugeSet extends ThreadStatesGaugeSet
A variation of ThreadStatesGaugeSet that caches the ThreadInfo[] objects for a given interval.
-
-
Constructor Summary
Constructors Constructor Description CachedThreadStatesGaugeSet(long interval, TimeUnit unit)
Creates a new set of gauges using the default MXBeans.CachedThreadStatesGaugeSet(ThreadMXBean threadMXBean, ThreadDeadlockDetector deadlockDetector, long interval, TimeUnit unit)
Creates a new set of gauges using the given MXBean and detector.
-
-
-
Constructor Detail
-
CachedThreadStatesGaugeSet
public CachedThreadStatesGaugeSet(ThreadMXBean threadMXBean, ThreadDeadlockDetector deadlockDetector, long interval, TimeUnit unit)
Creates a new set of gauges using the given MXBean and detector. Caches the information for the given interval and time unit.- Parameters:
threadMXBean
- a thread MXBeandeadlockDetector
- a deadlock detectorinterval
- cache intervalunit
- cache interval time unit
-
CachedThreadStatesGaugeSet
public CachedThreadStatesGaugeSet(long interval, TimeUnit unit)
Creates a new set of gauges using the default MXBeans. Caches the information for the given interval and time unit.- Parameters:
interval
- cache intervalunit
- cache interval time unit
-
-