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()
StatisticSupplier
snapshot
in interface CounterSupplier
snapshot
in interface StatisticSupplier
public StatisticState getState()
StatisticSupplier
getState
in interface StatisticSupplier
public long getCount()
CounterSupplier
getCount
in interface CounterSupplier
Copyright © 2020 Actian Corporation. All rights reserved.