public abstract class AbstractStopwatchSource<T> extends Object implements StopwatchSource<T>
MonitorSource producings stopwatches.| Constructor and Description |
|---|
AbstractStopwatchSource(Manager manager)
Constructor with
Manager. |
| Modifier and Type | Method and Description |
|---|---|
Manager |
getManager()
Returns the
Manager used as a real source of monitors. |
Stopwatch |
getMonitor(T location)
Provide a Stopwatch for given location.
|
protected abstract String |
getMonitorName(T location)
Get monitor name for the given location.
|
boolean |
isMonitored(T location)
Default implementation returns always true.
|
Split |
start(T location)
Convenient method to return split for the location or disabled split, if the location is not monitored.
|
public AbstractStopwatchSource(Manager manager)
Manager.manager - Simon manager used for producing Stopwatchespublic Manager getManager()
MonitorSourceManager used as a real source of monitors.getManager in interface MonitorSource<T,Stopwatch>public boolean isMonitored(T location)
isMonitored in interface MonitorSource<T,Stopwatch>location - Locationprotected abstract String getMonitorName(T location)
public Stopwatch getMonitor(T location)
getMonitor in interface MonitorSource<T,Stopwatch>location - Locationpublic Split start(T location)
StopwatchSourcestart in interface StopwatchSource<T>location - location to be monitoredSplit for the location or {Split#DISABLED} if the location is not monitoredCopyright © 2019. All rights reserved.