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
A variation of ThreadStatesGaugeSet that caches the ThreadInfo[] objects for
a given interval.
-
Constructor Summary
ConstructorsConstructorDescriptionCachedThreadStatesGaugeSet
(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. -
Method Summary
Methods inherited from class com.codahale.metrics.jvm.ThreadStatesGaugeSet
getMetrics
-
Constructor Details
-
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
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
-