Package io.dropwizard.metrics5.jvm
Class CachedThreadStatesGaugeSet
java.lang.Object
io.dropwizard.metrics5.jvm.ThreadStatesGaugeSet
io.dropwizard.metrics5.jvm.CachedThreadStatesGaugeSet
- All Implemented Interfaces:
io.dropwizard.metrics5.Metric
,io.dropwizard.metrics5.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 io.dropwizard.metrics5.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
-