Class ThreadStatesGaugeSet

  • All Implemented Interfaces:
    com.codahale.metrics.Metric, com.codahale.metrics.MetricSet
    Direct Known Subclasses:
    CachedThreadStatesGaugeSet

    public class ThreadStatesGaugeSet
    extends Object
    implements com.codahale.metrics.MetricSet
    A set of gauges for the number of threads in their various states and deadlock detection.
    • Constructor Detail

      • ThreadStatesGaugeSet

        public ThreadStatesGaugeSet()
        Creates a new set of gauges using the default MXBeans.
      • ThreadStatesGaugeSet

        public ThreadStatesGaugeSet​(ThreadMXBean threads,
                                    ThreadDeadlockDetector deadlockDetector)
        Creates a new set of gauges using the given MXBean and detector.
        Parameters:
        threads - a thread MXBean
        deadlockDetector - a deadlock detector
    • Method Detail

      • getMetrics

        public Map<String,​com.codahale.metrics.Metric> getMetrics()
        Specified by:
        getMetrics in interface com.codahale.metrics.MetricSet