|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jamonapi.FactoryDisabled
public final class FactoryDisabled
Factory that returns null monitors when JAMon is disabled. Method are noops. Any methods that return Monitors return NullMonitors (noop monitors)
| Field Summary |
|---|
| Fields inherited from interface com.jamonapi.MonitorFactoryInterface |
|---|
VERSION |
| Constructor Summary | |
|---|---|
FactoryDisabled(MonitorFactoryInterface factoryEnabled)
Creates a new instance of FactoryDisabled |
|
| 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 |
disableTotalKeySizeTracking()
|
void |
enableActivityTracking(boolean enable)
This determines if activity tracking in ranges is enabled. |
void |
enableGlobalActive(boolean enable)
|
void |
enableTotalKeySizeTracking()
This will keep track of the total size of of the keys used to store the monitors which can be useful in keeping track of memory used by JAMon. |
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)
|
java.util.Map |
getMap()
Get the backing map that holds the the Monitors. |
int |
getMaxNumMonitors()
Return the max number of configured of monitors. |
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. |
long |
getTotalKeySize()
|
java.lang.String |
getVersion()
Get JAMon's version. |
boolean |
isActivityTrackingEnabled()
|
boolean |
isGlobalActiveEnabled()
|
boolean |
isTotalKeySizeTrackingEnabled()
|
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 |
setMaxNumMonitors(int maxMonitors)
Set the max number of monitors that can be tracked. |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FactoryDisabled(MonitorFactoryInterface factoryEnabled)
| Method Detail |
|---|
public Monitor add(MonKey key,
double value)
MonitorFactoryInterface
add in interface MonitorFactoryInterface
public Monitor add(java.lang.String label,
java.lang.String units,
double value)
MonitorFactoryInterface
add in interface MonitorFactoryInterfacepublic Monitor start()
MonitorFactoryInterface
start in interface MonitorFactoryInterfacepublic Monitor start(MonKey key)
MonitorFactoryInterface
start in interface MonitorFactoryInterfacepublic Monitor start(java.lang.String label)
MonitorFactoryInterface
start in interface MonitorFactoryInterfacepublic Monitor startNano(java.lang.String label)
MonitorFactoryInterface
startNano in interface MonitorFactoryInterfacepublic Monitor startNano(MonKey key)
MonitorFactoryInterface
startNano in interface MonitorFactoryInterfacepublic Monitor startPrimary(MonKey key)
MonitorFactoryInterface
startPrimary in interface MonitorFactoryInterfacepublic Monitor startPrimary(java.lang.String label)
MonitorFactoryInterface
startPrimary in interface MonitorFactoryInterfacepublic Monitor getMonitor(MonKey key)
MonitorFactoryInterface
getMonitor in interface MonitorFactoryInterface
public Monitor getMonitor(java.lang.String label,
java.lang.String units)
MonitorFactoryInterface
getMonitor in interface MonitorFactoryInterfacepublic Monitor getTimeMonitor(MonKey key)
MonitorFactoryInterface
getTimeMonitor in interface MonitorFactoryInterfacepublic Monitor getTimeMonitor(java.lang.String label)
MonitorFactoryInterface
getTimeMonitor in interface MonitorFactoryInterfacepublic void remove(MonKey key)
MonitorFactoryInterface
remove in interface MonitorFactoryInterface
public void remove(java.lang.String label,
java.lang.String units)
MonitorFactoryInterface
remove in interface MonitorFactoryInterfacepublic boolean exists(MonKey key)
MonitorFactoryInterface
exists in interface MonitorFactoryInterface
public boolean exists(java.lang.String label,
java.lang.String units)
MonitorFactoryInterface
exists in interface MonitorFactoryInterfacepublic MonitorComposite getComposite(java.lang.String units)
getComposite in interface MonitorFactoryInterfacepublic MonitorComposite getRootMonitor()
MonitorFactoryInterface
getRootMonitor in interface MonitorFactoryInterfacepublic int getNumRows()
MonitorFactoryInterface
getNumRows in interface MonitorFactoryInterfacepublic java.lang.String[] getRangeHeader()
MonitorFactoryInterface
getRangeHeader in interface MonitorFactoryInterfacepublic java.lang.Object[][] getRangeNames()
MonitorFactoryInterface
getRangeNames in interface MonitorFactoryInterfacepublic java.lang.String getVersion()
MonitorFactoryInterface
getVersion in interface MonitorFactoryInterfacepublic void setMap(java.util.Map map)
MonitorFactoryInterface
setMap in interface MonitorFactoryInterface
public void setRangeDefault(java.lang.String key,
RangeHolder rangeHolder)
MonitorFactoryInterface
setRangeDefault in interface MonitorFactoryInterfacepublic void reset()
MonitorFactoryInterface
reset in interface MonitorFactoryInterfacepublic void enableGlobalActive(boolean enable)
enableGlobalActive in interface MonitorFactoryInterfacepublic boolean isGlobalActiveEnabled()
isGlobalActiveEnabled in interface MonitorFactoryInterfacepublic Monitor getMonitor()
MonitorFactoryInterface
getMonitor in interface MonitorFactoryInterfacepublic java.util.Iterator iterator()
iterator in interface MonitorFactoryInterfacepublic java.util.Map getMap()
MonitorFactoryInterface
getMap in interface MonitorFactoryInterfacepublic void enableActivityTracking(boolean enable)
MonitorFactoryInterface
enableActivityTracking in interface MonitorFactoryInterfacepublic boolean isActivityTrackingEnabled()
isActivityTrackingEnabled in interface MonitorFactoryInterfacepublic int getMaxNumMonitors()
MonitorFactoryInterface
getMaxNumMonitors in interface MonitorFactoryInterfacepublic void setMaxNumMonitors(int maxMonitors)
MonitorFactoryInterface
setMaxNumMonitors in interface MonitorFactoryInterfacemaxMonitors - If positive then this is the max number of monitors that can be stored. 0 or negative means monitors can grow unbounded.public void enableTotalKeySizeTracking()
MonitorFactoryInterface
enableTotalKeySizeTracking in interface MonitorFactoryInterfacepublic void disableTotalKeySizeTracking()
disableTotalKeySizeTracking in interface MonitorFactoryInterfacepublic long getTotalKeySize()
getTotalKeySize in interface MonitorFactoryInterfacepublic boolean isTotalKeySizeTrackingEnabled()
isTotalKeySizeTrackingEnabled in interface MonitorFactoryInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||