|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.util.profiling.JavaSimonConfluenceMonitoring
public class JavaSimonConfluenceMonitoring
Implementation of ConfluenceMonitoring that uses Java Simon. It is also responsible
for enabling and disabling the monitoring based on events.
| Constructor Summary | |
|---|---|
JavaSimonConfluenceMonitoring(org.javasimon.Manager manager,
int maxEntries)
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
java.lang.String |
createName(java.lang.String name,
java.lang.String... optional)
Creates a legal name from the supplied mandatory suggestion, and optional extra parts. |
void |
disableCpuTiming()
Disable capturing CPU timing. |
void |
disableMonitoring()
Disable monitoring. |
void |
enableCpuTiming()
Enable capturing CPU timing. |
void |
enableMonitoring()
Enables monitoring. |
Counter |
fetchCounter(java.lang.String name,
java.lang.String... optional)
Fetches the counter associated with the supplied name details. |
boolean |
isCpuTimingEnabled()
|
boolean |
isMonitoringEnabled()
|
Split |
startSplit(java.lang.String name,
java.lang.String... optional)
Creates and starts a split timer associated with the supplied name details. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaSimonConfluenceMonitoring(org.javasimon.Manager manager,
int maxEntries)
| Method Detail |
|---|
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exception
public Counter fetchCounter(java.lang.String name,
java.lang.String... optional)
ConfluenceMonitoringConfluenceMonitoring.createName(String, String...).
fetchCounter in interface ConfluenceMonitoringname - the mandatory suggested nameoptional - the optional parts to concatenate with the mandatory suggestion
public Split startSplit(java.lang.String name,
java.lang.String... optional)
ConfluenceMonitoringConfluenceMonitoring.createName(String, String...).
The typical usage is:
final Split split = instance.startSplit("name");
try {
// code to execute
}
finally {
split.close();
}
Under Java 7, the following is also possible:
try (Split split = instance.startSplit("name")) {
// code to execute
}
startSplit in interface ConfluenceMonitoringname - the mandatory suggested nameoptional - the optional parts to concatenate with the mandatory suggestion
public java.lang.String createName(java.lang.String name,
java.lang.String... optional)
ConfluenceMonitoringThe method is provided for the case where the caller wants to pre-compute the name. For example, it maybe more efficient to generate the name once, to be re-used many times. Typically, this method will not be used.
The algorithm used is very simple:
null or a blank string,
they are replaced with an empty string.
"." separator.
<UNKNOWN> is returned instead.
createName in interface ConfluenceMonitoringname - the mandatory suggested nameoptional - the optional parts to concatenate with the mandatory suggestion
public boolean isMonitoringEnabled()
isMonitoringEnabled in interface ConfluenceMonitoringControlpublic void enableMonitoring()
ConfluenceMonitoringControl
enableMonitoring in interface ConfluenceMonitoringControlpublic void disableMonitoring()
ConfluenceMonitoringControl
disableMonitoring in interface ConfluenceMonitoringControlpublic boolean isCpuTimingEnabled()
isCpuTimingEnabled in interface ConfluenceMonitoringControlpublic void enableCpuTiming()
ConfluenceMonitoringControl
enableCpuTiming in interface ConfluenceMonitoringControlpublic void disableCpuTiming()
ConfluenceMonitoringControl
disableCpuTiming in interface ConfluenceMonitoringControl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||