org.javasimon.source
Interface MonitorSource<L,M extends Simon>

Type Parameters:
L - Location/invocation context
M - Simon type
All Known Subinterfaces:
StopwatchSource<L>
All Known Implementing Classes:
AbstractMethodStopwatchSource, AbstractStopwatchSource, CachedMonitorSource, CachedStopwatchSource, DisabledMonitorSource, DisabledStopwatchSource, ProxyStopwatchSource

public interface MonitorSource<L,M extends Simon>

Monitor source provides monitors (Simons) for a specific name. This mechanism enables caching of monitors for "locations" that do not change but may be expensive to transform to Simon names, for instance.

Author:
gquintana

Method Summary
 Manager getManager()
          Returns the Manager used as a real source of monitors.
 M getMonitor(L location)
          Returns the monitor for given location.
 boolean isMonitored(L location)
          Indicates whether given location should be monitored or not.
 

Method Detail

isMonitored

boolean isMonitored(L location)
Indicates whether given location should be monitored or not.

Parameters:
location - Location
Returns:
true means monitored

getMonitor

M getMonitor(L location)
Returns the monitor for given location.

Parameters:
location - Location
Returns:
Monitor

getManager

Manager getManager()
Returns the Manager used as a real source of monitors.

Returns:
Manager to get the monitors from


Copyright © 2013. All Rights Reserved.