Package io.dropwizard.metrics5.jvm
Class SafeFileDescriptorRatioGauge
- java.lang.Object
-
- io.dropwizard.metrics5.RatioGauge
-
- io.dropwizard.metrics5.jvm.SafeFileDescriptorRatioGauge
-
- All Implemented Interfaces:
io.dropwizard.metrics5.Gauge<Double>,io.dropwizard.metrics5.Metric
public class SafeFileDescriptorRatioGauge extends io.dropwizard.metrics5.RatioGaugeJava 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 Summary
Constructors Constructor Description SafeFileDescriptorRatioGauge()Creates a new gauge using the platform OS bean.SafeFileDescriptorRatioGauge(OperatingSystemMXBean os)Creates a new gauge using the given OS bean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.dropwizard.metrics5.RatioGauge.RatiogetRatio()
-
-
-
Constructor Detail
-
SafeFileDescriptorRatioGauge
public SafeFileDescriptorRatioGauge()
Creates a new gauge using the platform OS bean.
-
SafeFileDescriptorRatioGauge
public SafeFileDescriptorRatioGauge(OperatingSystemMXBean os)
Creates a new gauge using the given OS bean.- Parameters:
os- anOperatingSystemMXBean
-
-