org.javasimon.source
Class DisabledStopwatchSource<L>

java.lang.Object
  extended by org.javasimon.source.DisabledStopwatchSource<L>
All Implemented Interfaces:
MonitorSource<L,Stopwatch>, StopwatchSource<L>

public class DisabledStopwatchSource<L>
extends Object
implements StopwatchSource<L>

Disabled stopwatch source.

Since:
3.4
Author:
Richard "Virgo" Richter

Field Summary
private static DisabledStopwatchSource INSTANCE
          Singleton instance.
 
Constructor Summary
DisabledStopwatchSource()
           
 
Method Summary
static
<L> DisabledStopwatchSource<L>
get()
          Returns a singleton instance.
 Manager getManager()
          Returns the Manager used as a real source of monitors.
 Stopwatch getMonitor(L location)
          Returns the monitor for given location.
 boolean isMonitored(L location)
          Indicates whether given location should be monitored or not.
 Split start(L location)
          Convenient method to return split for the location or disabled split, if the location is not monitored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

private static final DisabledStopwatchSource INSTANCE
Singleton instance.

Constructor Detail

DisabledStopwatchSource

public DisabledStopwatchSource()
Method Detail

get

public static <L> DisabledStopwatchSource<L> get()
Returns a singleton instance.


start

public Split start(L location)
Description copied from interface: StopwatchSource
Convenient method to return split for the location or disabled split, if the location is not monitored.

Specified by:
start in interface StopwatchSource<L>
Parameters:
location - location to be monitored
Returns:
Split for the location or {Split#DISABLED} if the location is not monitored

isMonitored

public boolean isMonitored(L location)
Description copied from interface: MonitorSource
Indicates whether given location should be monitored or not.

Specified by:
isMonitored in interface MonitorSource<L,Stopwatch>
Parameters:
location - Location
Returns:
true means monitored

getMonitor

public Stopwatch getMonitor(L location)
Description copied from interface: MonitorSource
Returns the monitor for given location.

Specified by:
getMonitor in interface MonitorSource<L,Stopwatch>
Parameters:
location - Location
Returns:
Monitor

getManager

public Manager getManager()
Description copied from interface: MonitorSource
Returns the Manager used as a real source of monitors.

Specified by:
getManager in interface MonitorSource<L,Stopwatch>
Returns:
Manager to get the monitors from


Copyright © 2013. All Rights Reserved.