Package com.codahale.metrics.jvm
Class FileDescriptorRatioGauge
- java.lang.Object
-
- com.codahale.metrics.RatioGauge
-
- com.codahale.metrics.jvm.FileDescriptorRatioGauge
-
public class FileDescriptorRatioGauge extends RatioGauge
A gauge for the ratio of used to total file descriptors.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.codahale.metrics.RatioGauge
RatioGauge.Ratio
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.management.OperatingSystemMXBeanos
-
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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RatioGauge.RatiogetRatio()Returns theRatioGauge.Ratiowhich is the gauge's current value.private longinvoke(java.lang.String name)-
Methods inherited from class com.codahale.metrics.RatioGauge
getValue
-
-
-
-
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- anOperatingSystemMXBean
-
-
Method Detail
-
getRatio
protected RatioGauge.Ratio getRatio()
Description copied from class:RatioGaugeReturns theRatioGauge.Ratiowhich is the gauge's current value.- Specified by:
getRatioin classRatioGauge- Returns:
- the
RatioGauge.Ratiowhich is the gauge's current value
-
invoke
private long invoke(java.lang.String name) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException- Throws:
java.lang.NoSuchMethodExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException
-
-