public final class GaugeSnapshot extends Object implements GaugeSupplier, Serializable
GaugeSupplier.| Modifier and Type | Field and Description |
|---|---|
static GaugeSnapshot |
UNAVAILABLE
Constant that corresponds to a snapshot of a counter
whose value is unavailable
|
| Constructor and 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
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCurrentValue()
Returns the current value of the gauge or an unspecified
value if the gauge is unavailable.
|
long |
getMaxAllowedValue()
Returns the maximum allowed value for the gauge of
Long.MAX_VALUE if there is no maximum |
long |
getMinAllowedValue()
Returns the minimum allowed value for the gauge or
Long.MIN_VALUE if there is no minimum. |
StatisticState |
getState()
Returns the current state of the supplier.
|
GaugeSupplier |
snapshot()
Returns a snapshot of this statistic.
|
public static final GaugeSnapshot UNAVAILABLE
public GaugeSnapshot(GaugeSupplier supplier)
supplier - the gaugepublic GaugeSnapshot(StatisticState state, long currentValue, long minAllowedValue, long maxAllowedValue)
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 gaugepublic StatisticState getState()
StatisticSuppliergetState in interface StatisticSupplierpublic long getCurrentValue()
GaugeSuppliergetCurrentValue in interface GaugeSupplierpublic long getMinAllowedValue()
GaugeSupplierLong.MIN_VALUE if there is no minimum.getMinAllowedValue in interface GaugeSupplierpublic long getMaxAllowedValue()
GaugeSupplierLong.MAX_VALUE if there is no maximumgetMaxAllowedValue in interface GaugeSupplierpublic GaugeSupplier snapshot()
StatisticSuppliersnapshot in interface GaugeSuppliersnapshot in interface StatisticSupplierCopyright © 2016 Actian Corporation. All rights reserved.