Class SafeFileDescriptorRatioGauge

  • All Implemented Interfaces:
    io.dropwizard.metrics5.Gauge<Double>, io.dropwizard.metrics5.Metric

    public class SafeFileDescriptorRatioGauge
    extends io.dropwizard.metrics5.RatioGauge
    Java 9 compatible implementation of FileDescriptorRatioGauge that doesn't use reflection and is not susceptible to an InaccessibleObjectException The gauge represents a ratio of used to total file descriptors.
    Author:
    Vasily Vorontsov (vasily@wavefront.com)
    • Constructor Detail

      • SafeFileDescriptorRatioGauge

        public SafeFileDescriptorRatioGauge()
        Creates a new gauge using the platform OS bean.
    • Method Detail

      • getRatio

        protected io.dropwizard.metrics5.RatioGauge.Ratio getRatio()
        Specified by:
        getRatio in class io.dropwizard.metrics5.RatioGauge
        Returns:
        RatioGauge.Ratio of used to total file descriptors.