Class ThreadStatesGaugeSet

  • All Implemented Interfaces:
    io.dropwizard.metrics5.Metric, io.dropwizard.metrics5.MetricSet
    Direct Known Subclasses:
    CachedThreadStatesGaugeSet

    public class ThreadStatesGaugeSet
    extends Object
    implements io.dropwizard.metrics5.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<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Metric> getMetrics()
        Specified by:
        getMetrics in interface io.dropwizard.metrics5.MetricSet