java.lang.Object
com.pervasive.datarush.monitoring.GaugeSnapshot
- All Implemented Interfaces:
GaugeSupplier,StatisticSupplier,Serializable
A snapshot that reflects a point-in-time of a
GaugeSupplier.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GaugeSnapshotConstant that corresponds to a snapshot of a counter whose value is unavailable -
Constructor Summary
ConstructorsConstructorDescriptionGaugeSnapshot(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
Modifier and TypeMethodDescriptionlongReturns the current value of the gauge or an unspecified value if the gauge is unavailable.longReturns the maximum allowed value for the gauge ofLong.MAX_VALUEif there is no maximumlongReturns the minimum allowed value for the gauge orLong.MIN_VALUEif there is no minimum.getState()Returns the current state of the supplier.snapshot()Returns a snapshot of this statistic.
-
Field Details
-
UNAVAILABLE
Constant that corresponds to a snapshot of a counter whose value is unavailable
-
-
Constructor Details
-
GaugeSnapshot
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 Details
-
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
Description copied from interface:StatisticSupplierReturns a snapshot of this statistic.- Specified by:
snapshotin interfaceGaugeSupplier- Specified by:
snapshotin interfaceStatisticSupplier- Returns:
- a snapshot of this statistic.
-