- java.lang.Object
-
- com.pervasive.datarush.monitoring.GaugeSnapshot
-
- All Implemented Interfaces:
GaugeSupplier,StatisticSupplier,Serializable
public final class GaugeSnapshot extends Object implements GaugeSupplier, Serializable
A snapshot that reflects a point-in-time of aGaugeSupplier.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static GaugeSnapshotUNAVAILABLEConstant that corresponds to a snapshot of a counter whose value is unavailable
-
Constructor Summary
Constructors Constructor Description GaugeSnapshot(GaugeSupplier supplier)Create a snapshot of the given gauge.GaugeSnapshot(StatisticState state, long currentValue, long minAllowedValue, long maxAllowedValue)Create a snapshot with the specified values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCurrentValue()Returns the current value of the gauge or an unspecified value if the gauge is unavailable.longgetMaxAllowedValue()Returns the maximum allowed value for the gauge ofLong.MAX_VALUEif there is no maximumlonggetMinAllowedValue()Returns the minimum allowed value for the gauge orLong.MIN_VALUEif there is no minimum.StatisticStategetState()Returns the current state of the supplier.GaugeSuppliersnapshot()Returns a snapshot of this statistic.
-
-
-
Field Detail
-
UNAVAILABLE
public static final GaugeSnapshot UNAVAILABLE
Constant that corresponds to a snapshot of a counter whose value is unavailable
-
-
Constructor Detail
-
GaugeSnapshot
public GaugeSnapshot(GaugeSupplier supplier)
Create a snapshot of the given gauge.- Parameters:
supplier- the gauge
-
GaugeSnapshot
public GaugeSnapshot(StatisticState state, long currentValue, long minAllowedValue, long maxAllowedValue)
Create a snapshot with the specified values- Parameters:
state- the state of the gaugecurrentValue- the current value of the gaugeminAllowedValue- the minimum allowed value of the gaugemaxAllowedValue- the maximum allowed value of the gauge
-
-
Method Detail
-
getState
public StatisticState getState()
Description copied from interface:StatisticSupplierReturns the current state of the supplier.- Specified by:
getStatein interfaceStatisticSupplier- Returns:
- the state of the supplier
-
getCurrentValue
public long getCurrentValue()
Description copied from interface:GaugeSupplierReturns the current value of the gauge or an unspecified value if the gauge is unavailable.- Specified by:
getCurrentValuein interfaceGaugeSupplier- Returns:
- the current value of the gauge
-
getMinAllowedValue
public long getMinAllowedValue()
Description copied from interface:GaugeSupplierReturns the minimum allowed value for the gauge orLong.MIN_VALUEif there is no minimum.- Specified by:
getMinAllowedValuein interfaceGaugeSupplier- Returns:
- the minimum allowed value for the gauge
-
getMaxAllowedValue
public long getMaxAllowedValue()
Description copied from interface:GaugeSupplierReturns the maximum allowed value for the gauge ofLong.MAX_VALUEif there is no maximum- Specified by:
getMaxAllowedValuein interfaceGaugeSupplier- Returns:
- the maximum allowed value for the gauge
-
snapshot
public GaugeSupplier snapshot()
Description copied from interface:StatisticSupplierReturns a snapshot of this statistic.- Specified by:
snapshotin interfaceGaugeSupplier- Specified by:
snapshotin interfaceStatisticSupplier- Returns:
- a snapshot of this statistic.
-
-