public final class CounterSnapshot extends Object implements CounterSupplier, Serializable
CounterSupplier.| Modifier and Type | Field and Description |
|---|---|
static CounterSnapshot |
UNAVAILABLE
Constant that corresponds to a snapshot of a counter
in the
StatisticState.UNAVAILABLE state. |
| Constructor and Description |
|---|
CounterSnapshot(CounterSupplier source)
Create a snapshot of the given counter.
|
CounterSnapshot(StatisticState state,
long count)
Create a snapshot with the specified values
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
long |
getCount()
This will return the value of the counter or an undefined value if never started.
|
StatisticState |
getState()
Returns the current state of the supplier.
|
int |
hashCode() |
CounterSnapshot |
snapshot()
Returns a snapshot of this statistic.
|
String |
toString() |
public static final CounterSnapshot UNAVAILABLE
StatisticState.UNAVAILABLE state.public CounterSnapshot(CounterSupplier source)
source - the counterpublic CounterSnapshot(StatisticState state, long count)
state - the state of the countercount - the count of the counterpublic CounterSnapshot snapshot()
StatisticSuppliersnapshot in interface CounterSuppliersnapshot in interface StatisticSupplierpublic StatisticState getState()
StatisticSuppliergetState in interface StatisticSupplierpublic long getCount()
CounterSuppliergetCount in interface CounterSupplierCopyright © 2024 Actian Corporation. All rights reserved.