Package com.codahale.metrics.jvm
Class ThreadStatesGaugeSet
java.lang.Object
com.codahale.metrics.jvm.ThreadStatesGaugeSet
A set of gauges for the number of threads in their various states and deadlock detection.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new set of gauges using the default MXBeans.ThreadStatesGaugeSet
(ThreadMXBean threads, ThreadDeadlockDetector deadlockDetector) Creates a new set of gauges using the given MXBean and detector. -
Method Summary
Modifier and TypeMethodDescriptionA map of metric names to metrics.private int
getThreadCount
(Thread.State state)
-
Field Details
-
threads
-
deadlockDetector
-
-
Constructor Details
-
ThreadStatesGaugeSet
public ThreadStatesGaugeSet()Creates a new set of gauges using the default MXBeans. -
ThreadStatesGaugeSet
Creates a new set of gauges using the given MXBean and detector.- Parameters:
threads
- a thread MXBeandeadlockDetector
- a deadlock detector
-
-
Method Details
-
getMetrics
Description copied from interface:MetricSet
A map of metric names to metrics.- Specified by:
getMetrics
in interfaceMetricSet
- Returns:
- the metrics
-
getThreadCount
-