-
- 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.UNAVAILABLEif all partitions are unavailable. Otherwise the aggregatedStatisticSupplier.getState()isStatisticState.FINISHEDif 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 longgetEndTimeMillis()Returns the end time if finished, the current time if running, or an undefined value if never started.longgetStartTimeMillis()This will return the start time or an undefined value if never started.longgetTimeIntervalMillis()If state isStatisticState.ACTIVEorStatisticState.FINISHEDshould always returngetEndTimeMillis()-getStartTimeMillis.IntervalTimerSuppliersnapshot()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.ACTIVEstate, 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.ACTIVEorStatisticState.FINISHEDshould 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:
snapshotin interfaceStatisticSupplier- Returns:
- a snapshot of this statistic.
-
-