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.RatiogetRatio()Returns theRatioGauge.Ratiowhich is the gauge's current value.private longMethods 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: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(String name) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
-