public final class SystemDebugCallback extends CallbackSkeleton
Callback.Event
Modifier and Type | Field and Description |
---|---|
static String |
DEBUG_PREFIX |
Constructor and Description |
---|
SystemDebugCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onCounterDecrease(Counter counter,
long dec,
CounterSample sample)
Counter decrease event.
|
void |
onCounterIncrease(Counter counter,
long inc,
CounterSample sample)
Counter increase event.
|
void |
onCounterSet(Counter counter,
long val,
CounterSample sample)
Counter set event.
|
void |
onManagerClear()
Event called when the manager is cleared.
|
void |
onManagerMessage(String message)
Message event is used to propagate arbitrary messages from the manager, or it can
be used by the other Callback methods internally.
|
void |
onManagerWarning(String warning,
Exception cause)
Warning and stack trace are print out to the error output.
|
void |
onSimonCreated(Simon simon)
Simon created event is called when Simon is successfully created by the Manager.
|
void |
onSimonDestroyed(Simon simon)
Simon destroyed event is called when Simon is successfully destroyed by the Manager.
|
void |
onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample)
Stopwatch add split event.
|
void |
onStopwatchStart(Split split)
Stopwatch start event.
|
void |
onStopwatchStop(Split split,
StopwatchSample sample)
Stopwatch stop event.
|
cleanup, initialize
public static final String DEBUG_PREFIX
public SystemDebugCallback()
public void onStopwatchStart(Split split)
Callback
StopwatchSample
valid for the moment after the start is provided because the callback
is executed out of synchronized block.
It is guaranteed that Split.getStopwatch()
will not return null
.onStopwatchStart
in interface Callback
onStopwatchStart
in class CallbackSkeleton
split
- started Splitpublic 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 stoppublic 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 onCounterDecrease(Counter counter, long dec, CounterSample sample)
Callback
CounterSample
valid for the moment after the operation is provided
because the callback is executed out of synchronized block.onCounterDecrease
in interface Callback
onCounterDecrease
in class CallbackSkeleton
counter
- modified Counterdec
- decrement amountsample
- counter sampled after the operationpublic void onCounterIncrease(Counter counter, long inc, CounterSample sample)
Callback
CounterSample
valid for the moment after the operation is provided
because the callback is executed out of synchronized block.onCounterIncrease
in interface Callback
onCounterIncrease
in class CallbackSkeleton
counter
- modified Counterinc
- increment amountsample
- counter sampled after the operationpublic void onCounterSet(Counter counter, long val, CounterSample sample)
Callback
CounterSample
valid for the moment after the operation is provided
because the callback is executed out of synchronized block.onCounterSet
in interface Callback
onCounterSet
in class CallbackSkeleton
counter
- modified Counterval
- new valuesample
- counter sampled after the operationpublic void onSimonCreated(Simon simon)
Callback
onSimonCreated
in interface Callback
onSimonCreated
in class CallbackSkeleton
simon
- created Simonpublic void onSimonDestroyed(Simon simon)
Callback
onSimonDestroyed
in interface Callback
onSimonDestroyed
in class CallbackSkeleton
simon
- destroyed Simonpublic void onManagerClear()
Callback
onManagerClear
in interface Callback
onManagerClear
in class CallbackSkeleton
public void onManagerMessage(String message)
Callback
onManagerMessage
in interface Callback
onManagerMessage
in class CallbackSkeleton
message
- message textpublic void onManagerWarning(String warning, Exception cause)
onManagerWarning
in interface Callback
onManagerWarning
in class CallbackSkeleton
warning
- arbitrary warning message - can be null
, unless concrete implementation states otherwisecause
- exception causing this warning - can be null
, unless concrete implementation states otherwiseCopyright © 2019. All rights reserved.