-
- All Superinterfaces:
StatisticSupplier
- All Known Implementing Classes:
AbstractIntervalTimerSupplier
,IntervalTimer
,IntervalTimerSnapshot
public interface IntervalTimerSupplier extends StatisticSupplier
Abstract statistic that represents "wall-clock" time of some runtime activity. Timers consist of a state(unavailable, started, stopped), a start time, and an end time. Timers always aggregate in the following way:- The aggregated
StatisticSupplier.getState()
isStatisticState.UNAVAILABLE
if all partitions are unavailable. Otherwise the aggregatedStatisticSupplier.getState()
isStatisticState.FINISHED
if all partitions areStatisticState.FINISHED
. Otherwise the aggregatedStatisticSupplier.getState()
isStatisticState.ACTIVE
- The aggregated
getStartTimeMillis()
is defined to be the minimum across all partitions - The aggregated
getEndTimeMillis()
is defined to be the maximum across all partitions - The aggregated
getTimeIntervalMillis()
is defined to be the difference between the aggregatedgetEndTimeMillis()
and the aggregatedgetStartTimeMillis()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getEndTimeMillis()
Returns the end time if finished, the current time if running, or an undefined value if never started.long
getStartTimeMillis()
This will return the start time or an undefined value if never started.long
getTimeIntervalMillis()
If state isStatisticState.ACTIVE
orStatisticState.FINISHED
should always returngetEndTimeMillis()-getStartTimeMillis
.IntervalTimerSupplier
snapshot()
Creates a snapshot of this timer.-
Methods inherited from interface com.pervasive.datarush.monitoring.StatisticSupplier
getState
-
-
-
-
Method Detail
-
getStartTimeMillis
long getStartTimeMillis()
This will return the start time or an undefined value if never started.- Returns:
- the start time or an undefined value if never started.
-
getEndTimeMillis
long getEndTimeMillis()
Returns the end time if finished, the current time if running, or an undefined value if never started. If this timer corresponds to a snapshot of a timer that is in theStatisticState.ACTIVE
state, then this value will reflect the time at which the snapshot was taken.- Returns:
- the end time if finished, the current time if running, or an undefined value if never started
-
getTimeIntervalMillis
long getTimeIntervalMillis()
If state isStatisticState.ACTIVE
orStatisticState.FINISHED
should always returngetEndTimeMillis()-getStartTimeMillis
. Otherwise, value is undefined.- Returns:
- the difference between end time and start time
-
snapshot
IntervalTimerSupplier snapshot()
Creates a snapshot of this timer. If the timer is in theStatisticState.ACTIVE
- Specified by:
snapshot
in interfaceStatisticSupplier
- Returns:
- a snapshot of this statistic.
-
-