public class SimonManagerMXBeanImpl extends Object implements SimonManagerMXBean
SimonManagerMXBean
for interface
documentation.
Most methods are implemented by calling the Manager
.Manager
,
Simon
,
SimonUtils
,
Serialized FormConstructor 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()
SimonManagerMXBean
enable
in interface SimonManagerMXBean
Manager.enable()
public final void disable()
SimonManagerMXBean
disable
in interface SimonManagerMXBean
Manager.disable()
public final boolean isEnabled()
SimonManagerMXBean
isEnabled
in interface SimonManagerMXBean
Manager.isEnabled()
public final String[] getSimonNames()
SimonManagerMXBean
getSimonNames
in interface SimonManagerMXBean
Manager.getSimonNames()
public final String[] getSimonNamesOrdered()
SimonManagerMXBean
getSimonNamesOrdered
in interface SimonManagerMXBean
Manager.getSimonNames()
public final String getType(String name)
SimonManagerMXBean
getType
in interface SimonManagerMXBean
name
- name of Simonpublic final SimonInfo[] getSimonInfos()
SimonManagerMXBean
getSimonInfos
in interface SimonManagerMXBean
SimonInfo
objectspublic final void clearManager()
SimonManagerMXBean
clearManager
in interface SimonManagerMXBean
Manager.clear()
public final void enableSimon(String name)
SimonManagerMXBean
enableSimon
in interface SimonManagerMXBean
name
- name of the SimonSimon.setState(org.javasimon.SimonState, boolean)
public final void disableSimon(String name)
SimonManagerMXBean
disableSimon
in interface SimonManagerMXBean
name
- name of the SimonSimon.setState(org.javasimon.SimonState, boolean)
public final void inheritState(String name)
SimonManagerMXBean
inheritState
in interface SimonManagerMXBean
name
- name of the Simonpublic final CounterSample getCounterSample(String name)
SimonManagerMXBean
getCounterSample
in interface SimonManagerMXBean
name
- name of the SimonCounterSample
public CounterSample getIncrementCounterSample(String name, String key)
SimonManagerMXBean
SimonManagerMXBean.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 SimonManagerMXBean
name
- name of the stopwatchkey
- name of an incremental samplepublic List<CounterSample> getCounterSamples(String namePattern)
getCounterSamples
in interface SimonManagerMXBean
namePattern
- Name pattern, null means all Counterspublic List<CounterSample> getIncrementCounterSamples(String namePattern, String key)
SimonManagerMXBean
getIncrementCounterSamples
in interface SimonManagerMXBean
namePattern
- name pattern (SimonPattern
), null
means all Counterskey
- name of an incremental sampleSimonManagerMXBean.getIncrementCounterSample(String, String)
public List<CounterSample> getCounterSamples()
getCounterSamples
in interface SimonManagerMXBean
public List<CounterSample> getIncrementCounterSamples(String key)
SimonManagerMXBean
getIncrementCounterSamples
in interface SimonManagerMXBean
key
- name of an incremental sampleSimonManagerMXBean.getIncrementCounterSample(String, String)
public final StopwatchSample getStopwatchSample(String name)
SimonManagerMXBean
getStopwatchSample
in interface SimonManagerMXBean
name
- name of the SimonStopwatchSample
public StopwatchSample getIncrementStopwatchSample(String name, String key)
SimonManagerMXBean
SimonManagerMXBean.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 SimonManagerMXBean
name
- name of the stopwatchkey
- name of an incremental samplepublic List<StopwatchSample> getStopwatchSamples(String namePattern)
SimonManagerMXBean
getStopwatchSamples
in interface SimonManagerMXBean
namePattern
- name pattern (SimonPattern
), null
means all Stopwatchespublic List<StopwatchSample> getIncrementStopwatchSamples(String namePattern, String key)
SimonManagerMXBean
getIncrementStopwatchSamples
in interface SimonManagerMXBean
namePattern
- name pattern (SimonPattern
), null
means all Stopwatcheskey
- name of an incremental sampleSimonManagerMXBean.getIncrementStopwatchSample(String, String)
public List<StopwatchSample> getStopwatchSamples()
SimonManagerMXBean
getStopwatchSamples
in interface SimonManagerMXBean
public List<StopwatchSample> getIncrementStopwatchSamples(String key)
SimonManagerMXBean
getIncrementStopwatchSamples
in interface SimonManagerMXBean
key
- name of an incremental sampleSimonManagerMXBean.getIncrementStopwatchSample(String, String)
public final void printSimonTree()
SimonManagerMXBean
printSimonTree
in interface SimonManagerMXBean
SimonUtils.simonTreeString(org.javasimon.Simon)
Copyright © 2019. All rights reserved.