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

public class CachedThreadStatesGaugeSet extends ThreadStatesGaugeSet
A variation of ThreadStatesGaugeSet that caches the ThreadInfo[] objects for a given interval.
  • 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 MXBean
      deadlockDetector - a deadlock detector
      interval - cache interval
      unit - cache interval time unit
    • CachedThreadStatesGaugeSet

      public CachedThreadStatesGaugeSet(long interval, TimeUnit unit)
      Creates a new set of gauges using the default MXBeans. Caches the information for the given interval and time unit.
      Parameters:
      interval - cache interval
      unit - cache interval time unit