public class SimonManagerMXBeanImpl extends Object implements SimonManagerMXBean
SimonManagerMXBean for interface
documentation.
Most methods are implemented by calling the Manager.Manager,
Simon,
SimonUtils,
Serialized Form| Constructor and Description |
|---|
SimonManagerMXBeanImpl(Manager manager)
MXBean constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearManager()
Clears the Manager (ignored if manager is disabled).
|
void |
disable()
Disables the Simon Manager, disable monitoring application by Simons.
|
void |
disableSimon(String name)
Disables particular Simon only.
|
void |
enable()
Enables the Simon Manager, enable monitoring application by Simons.
|
void |
enableSimon(String name)
Enables particular Simon only.
|
CounterSample |
getCounterSample(String name)
Retrieves sample data object for a particular Counter.
|
List<CounterSample> |
getCounterSamples()
Sample all Counters
|
List<CounterSample> |
getCounterSamples(String namePattern)
Sample all Counters whose name matches given pattern
|
CounterSample |
getIncrementCounterSample(String name,
String key)
Samples increment in Counter values since the previous call of this method with the
same key.
|
List<CounterSample> |
getIncrementCounterSamples(String key)
Increment sample all Counters.
|
List<CounterSample> |
getIncrementCounterSamples(String namePattern,
String key)
Incremental sample for all Counters whose name matches given pattern.
|
StopwatchSample |
getIncrementStopwatchSample(String name,
String key)
Samples increment in Stopwatch values since the previous call of this method with the
same key.
|
List<StopwatchSample> |
getIncrementStopwatchSamples(String key)
Increment sample all Stopwatches.
|
List<StopwatchSample> |
getIncrementStopwatchSamples(String namePattern,
String key)
Increment sample all Stopwatches whose name matches given pattern.
|
SimonInfo[] |
getSimonInfos()
Returns array containing names and types of all existing Simons ordered naturally by name.
|
String[] |
getSimonNames()
Returns array containing full hierarchical names of all existing Simons.
|
String[] |
getSimonNamesOrdered()
Returns array containing full hierarchical names of all existing Simons in natural String order.
|
StopwatchSample |
getStopwatchSample(String name)
Retrieves sample data object for a particular Stopwatch.
|
List<StopwatchSample> |
getStopwatchSamples()
Sample all Stopwatches.
|
List<StopwatchSample> |
getStopwatchSamples(String namePattern)
Sample all Stopwatches whose name matches given pattern.
|
String |
getType(String name)
Returns type of Simon, either COUNTER, STOPWATCH or UNKNOWN.
|
void |
inheritState(String name)
Lets the Simon to inherit its enable/disable state from its parent.
|
boolean |
isEnabled()
Returns true if the Simon Manager is enabled, if monitoring is enabled.
|
void |
printSimonTree()
Prints multi-line string containing Simon tree starting with the specified Simon to standard output.
|
public SimonManagerMXBeanImpl(Manager manager)
manager - instance of Manager, typically SimonManager.manager().public final void enable()
SimonManagerMXBeanenable in interface SimonManagerMXBeanManager.enable()public final void disable()
SimonManagerMXBeandisable in interface SimonManagerMXBeanManager.disable()public final boolean isEnabled()
SimonManagerMXBeanisEnabled in interface SimonManagerMXBeanManager.isEnabled()public final String[] getSimonNames()
SimonManagerMXBeangetSimonNames in interface SimonManagerMXBeanManager.getSimonNames()public final String[] getSimonNamesOrdered()
SimonManagerMXBeangetSimonNamesOrdered in interface SimonManagerMXBeanManager.getSimonNames()public final String getType(String name)
SimonManagerMXBeangetType in interface SimonManagerMXBeanname - name of Simonpublic final SimonInfo[] getSimonInfos()
SimonManagerMXBeangetSimonInfos in interface SimonManagerMXBeanSimonInfo objectspublic final void clearManager()
SimonManagerMXBeanclearManager in interface SimonManagerMXBeanManager.clear()public final void enableSimon(String name)
SimonManagerMXBeanenableSimon in interface SimonManagerMXBeanname - name of the SimonSimon.setState(org.javasimon.SimonState, boolean)public final void disableSimon(String name)
SimonManagerMXBeandisableSimon in interface SimonManagerMXBeanname - name of the SimonSimon.setState(org.javasimon.SimonState, boolean)public final void inheritState(String name)
SimonManagerMXBeaninheritState in interface SimonManagerMXBeanname - name of the Simonpublic final CounterSample getCounterSample(String name)
SimonManagerMXBeangetCounterSample in interface SimonManagerMXBeanname - name of the SimonCounterSamplepublic CounterSample getIncrementCounterSample(String name, String key)
SimonManagerMXBeanSimonManagerMXBean.getCounterSample(String) }. Any subsequent calls with the key
provide increments.
Clients should use a unique key (GUID, host name, etc.), to avoid interference
with other clients.getIncrementCounterSample in interface SimonManagerMXBeanname - name of the stopwatchkey - name of an incremental samplepublic List<CounterSample> getCounterSamples(String namePattern)
getCounterSamples in interface SimonManagerMXBeannamePattern - Name pattern, null means all Counterspublic List<CounterSample> getIncrementCounterSamples(String namePattern, String key)
SimonManagerMXBeangetIncrementCounterSamples in interface SimonManagerMXBeannamePattern - name pattern (SimonPattern), null means all Counterskey - name of an incremental sampleSimonManagerMXBean.getIncrementCounterSample(String, String)public List<CounterSample> getCounterSamples()
getCounterSamples in interface SimonManagerMXBeanpublic List<CounterSample> getIncrementCounterSamples(String key)
SimonManagerMXBeangetIncrementCounterSamples in interface SimonManagerMXBeankey - name of an incremental sampleSimonManagerMXBean.getIncrementCounterSample(String, String)public final StopwatchSample getStopwatchSample(String name)
SimonManagerMXBeangetStopwatchSample in interface SimonManagerMXBeanname - name of the SimonStopwatchSamplepublic StopwatchSample getIncrementStopwatchSample(String name, String key)
SimonManagerMXBeanSimonManagerMXBean.getCounterSample(String) }. Any subsequent calls with the key
provide increments.
Clients should use a unique key (GUID, host name, etc.), to avoid interference
with other clients.getIncrementStopwatchSample in interface SimonManagerMXBeanname - name of the stopwatchkey - name of an incremental samplepublic List<StopwatchSample> getStopwatchSamples(String namePattern)
SimonManagerMXBeangetStopwatchSamples in interface SimonManagerMXBeannamePattern - name pattern (SimonPattern), null means all Stopwatchespublic List<StopwatchSample> getIncrementStopwatchSamples(String namePattern, String key)
SimonManagerMXBeangetIncrementStopwatchSamples in interface SimonManagerMXBeannamePattern - name pattern (SimonPattern), null means all Stopwatcheskey - name of an incremental sampleSimonManagerMXBean.getIncrementStopwatchSample(String, String)public List<StopwatchSample> getStopwatchSamples()
SimonManagerMXBeangetStopwatchSamples in interface SimonManagerMXBeanpublic List<StopwatchSample> getIncrementStopwatchSamples(String key)
SimonManagerMXBeangetIncrementStopwatchSamples in interface SimonManagerMXBeankey - name of an incremental sampleSimonManagerMXBean.getIncrementStopwatchSample(String, String)public final void printSimonTree()
SimonManagerMXBeanprintSimonTree in interface SimonManagerMXBeanSimonUtils.simonTreeString(org.javasimon.Simon)Copyright © 2019. All rights reserved.