Package com.codahale.metrics.jvm
Class FileDescriptorRatioGauge
java.lang.Object
com.codahale.metrics.RatioGauge
com.codahale.metrics.jvm.FileDescriptorRatioGauge
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 -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new gauge using the platform OS bean.Creates a new gauge using the given OS bean. -
Method Summary
Modifier and TypeMethodDescriptionprotected RatioGauge.Ratio
getRatio()
Returns theRatioGauge.Ratio
which is the gauge's current value.private long
Methods inherited from class com.codahale.metrics.RatioGauge
getValue
-
Field Details
-
os
-
-
Constructor Details
-
FileDescriptorRatioGauge
public FileDescriptorRatioGauge()Creates a new gauge using the platform OS bean. -
FileDescriptorRatioGauge
Creates a new gauge using the given OS bean.- Parameters:
os
- anOperatingSystemMXBean
-
-
Method Details
-
getRatio
Description copied from class:RatioGauge
Returns theRatioGauge.Ratio
which is the gauge's current value.- Specified by:
getRatio
in classRatioGauge
- Returns:
- the
RatioGauge.Ratio
which is the gauge's current value
-
invoke
private long invoke(String name) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
-