com.jamonapi
Interface MonitorFactoryInterface

All Known Implementing Classes:
FactoryDisabled, FactoryEnabled

public interface MonitorFactoryInterface


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 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 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 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
 

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.


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)

iterator

java.util.Iterator iterator()