Class FileDescriptorRatioGauge

  • All Implemented Interfaces:
    Gauge<java.lang.Double>, Metric

    public class FileDescriptorRatioGauge
    extends RatioGauge
    A gauge for the ratio of used to total file descriptors.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.management.OperatingSystemMXBean os  
    • Constructor Summary

      Constructors 
      Constructor Description
      FileDescriptorRatioGauge()
      Creates a new gauge using the platform OS bean.
      FileDescriptorRatioGauge​(java.lang.management.OperatingSystemMXBean os)
      Creates a new gauge using the given OS bean.
    • Field Detail

      • os

        private final java.lang.management.OperatingSystemMXBean os
    • Constructor Detail

      • FileDescriptorRatioGauge

        public FileDescriptorRatioGauge()
        Creates a new gauge using the platform OS bean.
      • FileDescriptorRatioGauge

        public FileDescriptorRatioGauge​(java.lang.management.OperatingSystemMXBean os)
        Creates a new gauge using the given OS bean.
        Parameters:
        os - an OperatingSystemMXBean
    • Method Detail

      • invoke

        private long invoke​(java.lang.String name)
                     throws java.lang.NoSuchMethodException,
                            java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException
        Throws:
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException