com.jamonapi
Interface MonitorFactoryInterface

All Known Implementing Classes:
FactoryDisabled, FactoryEnabled

public interface MonitorFactoryInterface


Field Summary
static java.lang.String VERSION
           
 
Method Summary
 Monitor add(MonKey key, double value)
          Used when you want to create your own key for the monitor.
 Monitor add(java.lang.String label, java.lang.String units, double value)
          Return a monitor with the given label and units.
 void enableActivityTracking(boolean enable)
          This determines if activity tracking in ranges is enabled.
 void enableGlobalActive(boolean enable)
           
 boolean exists(MonKey key)
          Return true if the monitor associated with the passed in key exists
 boolean exists(java.lang.String label, java.lang.String units)
          Return true if the monitor associated with the passed in label and units exists
 MonitorComposite getComposite(java.lang.String units)
           
 Monitor getMonitor()
          Returns a non-TimeMonitor that won't update the jamon factory.
 Monitor getMonitor(MonKey key)
          Get the monitor associated with the passed in key.
 Monitor getMonitor(java.lang.String label, java.lang.String units)
          Get the monitor with the passed in label, and units.
 int getNumRows()
          Get the number of monitors in this factory
 java.lang.String[] getRangeHeader()
          Return the header associated with range names
 java.lang.Object[][] getRangeNames()
          Retun an array of range names.
 MonitorComposite getRootMonitor()
          Get the root composite monitor that contains all monitors in this factory
 Monitor getTimeMonitor(MonKey key)
          Get the time monitor associated with the passed in key.
 Monitor getTimeMonitor(java.lang.String label)
          Get the time monitor associated with the passed in label.
 java.lang.String getVersion()
          Get JAMon's version.
 boolean isActivityTrackingEnabled()
           
 boolean isGlobalActiveEnabled()
           
 java.util.Iterator iterator()
           
 void remove(MonKey key)
          Remove the monitor associated with the passed in key
 void remove(java.lang.String label, java.lang.String units)
          Remove the monitor associated with the passed in label and units
 void reset()
          Reset jamon stats for this factory.
 void setMap(java.util.Map map)
          Set the map that holds the monitors.
 void setRangeDefault(java.lang.String key, RangeHolder rangeHolder)
          Associate a Range mapping to any monitor that has a unit/key name that matches what is passed to key
 Monitor start()
          Returns a TimeMonitor that won't update the jamon factory.
 Monitor start(MonKey key)
          Start using the passed in key.
 Monitor start(java.lang.String label)
          Return a time monitor (the units are implied and are ms.
 Monitor startNano(MonKey key)
          Provide your own key to a nanosecond timer
 Monitor startNano(java.lang.String label)
          Create a timing monitor that uses nanosecond granularity (1,000,000 ns.=1 ms.)
 Monitor startPrimary(MonKey key)
          Start a monitor with the specified key and mark it as primary
 Monitor startPrimary(java.lang.String label)
          Start a time monitor and mark it as primary
 

Field Detail

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values
Method Detail

add

Monitor add(java.lang.String label,
            java.lang.String units,
            double value)
Return a monitor with the given label and units. Note label has an effect on what range is used. If no range is associated with units then it will use the null range (i.e. no range) Sample Call: factory.add("com.fdsapi.MyException", "error", 1);


add

Monitor add(MonKey key,
            double value)
Used when you want to create your own key for the monitor. This works similarly to a group by clause where the key is any columns used after the group by clause.


start

Monitor start(java.lang.String label)
Return a time monitor (the units are implied and are ms. Note activity stats are incremented


start

Monitor start(MonKey key)
Start using the passed in key. Note activity stats are incremented


start

Monitor start()
Returns a TimeMonitor that won't update the jamon factory.


startNano

Monitor startNano(java.lang.String label)
Create a timing monitor that uses nanosecond granularity (1,000,000 ns.=1 ms.)


startNano

Monitor startNano(MonKey key)
Provide your own key to a nanosecond timer


getMonitor

Monitor getMonitor()
Returns a non-TimeMonitor that won't update the jamon factory.


startPrimary

Monitor startPrimary(java.lang.String label)
Start a time monitor and mark it as primary


startPrimary

Monitor startPrimary(MonKey key)
Start a monitor with the specified key and mark it as primary


getMonitor

Monitor getMonitor(MonKey key)
Get the monitor associated with the passed in key. It will be created if it doesn't exist


getMonitor

Monitor getMonitor(java.lang.String label,
                   java.lang.String units)
Get the monitor with the passed in label, and units. It will be created if it doesn't exist


getTimeMonitor

Monitor getTimeMonitor(java.lang.String label)
Get the time monitor associated with the passed in label. It will be created if it doesn't exist. The units are in ms.


getTimeMonitor

Monitor getTimeMonitor(MonKey key)
Get the time monitor associated with the passed in key. It will be created if it doesn't exist. The units are in ms.


remove

void remove(java.lang.String label,
            java.lang.String units)
Remove the monitor associated with the passed in label and units


remove

void remove(MonKey key)
Remove the monitor associated with the passed in key


exists

boolean exists(java.lang.String label,
               java.lang.String units)
Return true if the monitor associated with the passed in label and units exists


exists

boolean exists(MonKey key)
Return true if the monitor associated with the passed in key exists


setRangeDefault

void setRangeDefault(java.lang.String key,
                     RangeHolder rangeHolder)
Associate a Range mapping to any monitor that has a unit/key name that matches what is passed to key


getRangeHeader

java.lang.String[] getRangeHeader()
Return the header associated with range names


getRangeNames

java.lang.Object[][] getRangeNames()
Retun an array of range names. This is dynamic based on what was passed to setRangeDefault


getNumRows

int getNumRows()
Get the number of monitors in this factory


getRootMonitor

MonitorComposite getRootMonitor()
Get the root composite monitor that contains all monitors in this factory


getComposite

MonitorComposite getComposite(java.lang.String units)

getVersion

java.lang.String getVersion()
Get JAMon's version. Example: 2.0


setMap

void setMap(java.util.Map map)
Set the map that holds the monitors. This could be used to aid jamon performance by passing in a high performance Thread safe map such as open source projects and jdk 1.5 have


reset

void reset()
Reset jamon stats for this factory. Like recreating the factory


isGlobalActiveEnabled

boolean isGlobalActiveEnabled()

enableGlobalActive

void enableGlobalActive(boolean enable)

enableActivityTracking

void enableActivityTracking(boolean enable)
This determines if activity tracking in ranges is enabled. Activity tracking allows you to see how performance tracks to the number of activities (monitors) that are running. For example it can let you see how your web site scales by seeing how performance correlates when 10 simultaneous pages are being invoked, or 20, 30, 40, 50 etc. Disabling or enabling will affect current monitors as well as any others that are subsequently created. One problem at this point is that any in flight monitors can be disabled/enabled while they are in flight leading to results that may be off. For this reason it is best to enable/disable before any monitors have been created or when you know none are running. A future enhancement may be to delay this capability until no monitors are running. Note disabling global active turns off a subset of this capability.

Parameters:
enable -

isActivityTrackingEnabled

boolean isActivityTrackingEnabled()

iterator

java.util.Iterator iterator()