public class TimelineCallback extends CallbackSkeleton
Callback.Event
Modifier and Type | Field and Description |
---|---|
static String |
TIMELINE_ATTRIBUTE_NAME
Default attribute name for storing timelines.
|
Constructor and Description |
---|
TimelineCallback()
Constructor using default attribute name, default timeline capacity of 6
and default timeline width of 10 minutes.
|
TimelineCallback(int timelineCapacity,
long timeRangeWidth)
Constructor using default attribute name.
|
TimelineCallback(String timelineAttributeName,
int timelineCapacity,
long timeRangeWidth)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
onSimonCreated(Simon simon)
On simon creation a timeline attribute is added (for Stopwatches only).
|
void |
onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample)
Stopwatch add split event.
|
void |
onStopwatchStop(Split split,
StopwatchSample sample)
Stopwatch stop event.
|
cleanup, initialize, onCounterDecrease, onCounterIncrease, onCounterSet, onManagerClear, onManagerMessage, onManagerWarning, onSimonDestroyed, onStopwatchStart
public static final String TIMELINE_ATTRIBUTE_NAME
public TimelineCallback(String timelineAttributeName, int timelineCapacity, long timeRangeWidth)
timelineAttributeName
- Simon attribute name used for storing TimelinetimelineCapacity
- Timeline capacity (number of time ranges)timeRangeWidth
- Time range width (in milliseconds)public TimelineCallback(int timelineCapacity, long timeRangeWidth)
timelineCapacity
- Timeline capacity (number of time ranges)timeRangeWidth
- Time range width (in milliseconds)public TimelineCallback()
public void onSimonCreated(Simon simon)
onSimonCreated
in interface Callback
onSimonCreated
in class CallbackSkeleton
simon
- created simonpublic void onStopwatchAdd(Stopwatch stopwatch, Split split, StopwatchSample sample)
Callback
StopwatchSample
valid for the moment after the add is provided
because the callback is executed out of synchronized block.
It is guaranteed that Split.getStopwatch()
will not return null
.onStopwatchAdd
in interface Callback
onStopwatchAdd
in class CallbackSkeleton
stopwatch
- modified Stopwatchsplit
- added split objectsample
- stopwatch sampled after the addpublic void onStopwatchStop(Split split, StopwatchSample sample)
Callback
StopwatchSample
valid for the moment after the stop is provided
because the callback is executed out of synchronized block.
It is guaranteed that Split.getStopwatch()
will not return null
.onStopwatchStop
in interface Callback
onStopwatchStop
in class CallbackSkeleton
split
- stopped Splitsample
- stopwatch sampled after the stopCopyright © 2019. All rights reserved.