- java.lang.Object
-
- com.pervasive.datarush.monitoring.AccumulatedTimerSnapshot
-
- All Implemented Interfaces:
AccumulatedTimerSupplier
,StatisticSupplier
,Serializable
public final class AccumulatedTimerSnapshot extends Object implements AccumulatedTimerSupplier, Serializable
A snapshot that reflects a point-in-time of aIntervalTimerSupplier
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static AccumulatedTimerSnapshot
UNAVAILABLE
Constant that corresponds to a snapshot of a counter in theStatisticState.UNAVAILABLE
state.
-
Constructor Summary
Constructors Constructor Description AccumulatedTimerSnapshot(AccumulatedTimerSupplier source)
Create a snapshot of the given timer.AccumulatedTimerSnapshot(StatisticState state, long accumulatedTimeMillis)
Create a snapshot with the specified values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAccumulatedTimeMillis()
The accumulated time so far.StatisticState
getState()
Returns the current state of the supplier.AccumulatedTimerSnapshot
snapshot()
Creates a snapshot of this timer.String
toString()
-
-
-
Field Detail
-
UNAVAILABLE
public static final AccumulatedTimerSnapshot UNAVAILABLE
Constant that corresponds to a snapshot of a counter in theStatisticState.UNAVAILABLE
state.
-
-
Constructor Detail
-
AccumulatedTimerSnapshot
public AccumulatedTimerSnapshot(AccumulatedTimerSupplier source)
Create a snapshot of the given timer.- Parameters:
source
- the timer
-
AccumulatedTimerSnapshot
public AccumulatedTimerSnapshot(StatisticState state, long accumulatedTimeMillis)
Create a snapshot with the specified values- Parameters:
state
- the state of the timeraccumulatedTimeMillis
- the accumulated time of the timer
-
-
Method Detail
-
snapshot
public AccumulatedTimerSnapshot snapshot()
Description copied from interface:AccumulatedTimerSupplier
Creates a snapshot of this timer. If the timer is in theStatisticState.ACTIVE
- Specified by:
snapshot
in interfaceAccumulatedTimerSupplier
- Specified by:
snapshot
in interfaceStatisticSupplier
- Returns:
- a snapshot of this statistic.
-
getState
public StatisticState getState()
Description copied from interface:StatisticSupplier
Returns the current state of the supplier.- Specified by:
getState
in interfaceStatisticSupplier
- Returns:
- the state of the supplier
-
getAccumulatedTimeMillis
public long getAccumulatedTimeMillis()
Description copied from interface:AccumulatedTimerSupplier
The accumulated time so far. For aggregations, this is the sum over all partitions of the to be the sum over all partitions of the partition'sAccumulatedTimerSupplier.getAccumulatedTimeMillis()
. This value is undefined if the timer isStatisticState.UNAVAILABLE
.- Specified by:
getAccumulatedTimeMillis
in interfaceAccumulatedTimerSupplier
- Returns:
- the accumulated time in milliseconds.
-
-