public final class CompositeCallbackImpl extends Object implements CompositeCallback
callbacks(), addCallback(Callback) and removeCallback(Callback).Callback.Event| Constructor and Description |
|---|
CompositeCallbackImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCallback(Callback callback)
Adds another callback as a child to this callback.
|
List<Callback> |
callbacks()
Returns the list of all child-callbacks.
|
void |
cleanup()
Calls deactivate on all children.
|
void |
initialize(Manager manager)
Calls initialize on all children.
|
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 event containing warning and/or cause.
|
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.
|
void |
removeAllCallbacks()
Removes specified callback from this callback, properly cleans up all the removed callbacks.
|
void |
removeCallback(Callback callback)
Removes specified callback from this callback, properly cleans up the removed callback.
|
public CompositeCallbackImpl()
public void initialize(Manager manager)
initialize in interface Callbackpublic List<Callback> callbacks()
callbacks in interface CompositeCallbackpublic void addCallback(Callback callback)
addCallback in interface CompositeCallbackcallback - added callbackpublic void removeCallback(Callback callback)
removeCallback in interface CompositeCallbackcallback - removed child-callbackpublic void removeAllCallbacks()
removeAllCallbacks in interface CompositeCallbackpublic void cleanup()
public void onStopwatchAdd(Stopwatch stopwatch, Split split, StopwatchSample sample)
CallbackStopwatchSample 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 Callbackstopwatch - modified Stopwatchsplit - added split objectsample - stopwatch sampled after the addpublic void onStopwatchStart(Split split)
CallbackStopwatchSample 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 Callbacksplit - started Splitpublic void onStopwatchStop(Split split, StopwatchSample sample)
CallbackStopwatchSample 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 Callbacksplit - stopped Splitsample - stopwatch sampled after the stoppublic void onCounterDecrease(Counter counter, long dec, CounterSample sample)
CallbackCounterSample valid for the moment after the operation is provided
because the callback is executed out of synchronized block.onCounterDecrease in interface Callbackcounter - modified Counterdec - decrement amountsample - counter sampled after the operationpublic void onCounterIncrease(Counter counter, long inc, CounterSample sample)
CallbackCounterSample valid for the moment after the operation is provided
because the callback is executed out of synchronized block.onCounterIncrease in interface Callbackcounter - modified Counterinc - increment amountsample - counter sampled after the operationpublic void onCounterSet(Counter counter, long val, CounterSample sample)
CallbackCounterSample valid for the moment after the operation is provided
because the callback is executed out of synchronized block.onCounterSet in interface Callbackcounter - modified Counterval - new valuesample - counter sampled after the operationpublic void onSimonCreated(Simon simon)
CallbackonSimonCreated in interface Callbacksimon - created Simonpublic void onSimonDestroyed(Simon simon)
CallbackonSimonDestroyed in interface Callbacksimon - destroyed Simonpublic void onManagerClear()
CallbackonManagerClear in interface Callbackpublic void onManagerMessage(String message)
CallbackonManagerMessage in interface Callbackmessage - message textpublic void onManagerWarning(String warning, Exception cause)
CallbackonManagerWarning in interface Callbackwarning - 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.