com.atlassian.confluence.util.profiling
Interface ConfluenceMonitoring

All Known Implementing Classes:
JavaSimonConfluenceMonitoring

public interface ConfluenceMonitoring


Method Summary
 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.
 Counter fetchCounter(java.lang.String name, java.lang.String... optional)
          Fetches the counter associated with the supplied name details.
 Split startSplit(java.lang.String name, java.lang.String... optional)
          Creates and starts a split timer associated with the supplied name details.
 

Method Detail

fetchCounter

Counter fetchCounter(java.lang.String name,
                     java.lang.String... optional)
Fetches the counter associated with the supplied name details. The name is constructed calling createName(String, String...).

Parameters:
name - the mandatory suggested name
optional - the optional parts to concatenate with the mandatory suggestion
Returns:
the counter associated with the name.

startSplit

Split startSplit(java.lang.String name,
                 java.lang.String... optional)
Creates and starts a split timer associated with the supplied name details. The name is constructed calling 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
 }
 

Parameters:
name - the mandatory suggested name
optional - the optional parts to concatenate with the mandatory suggestion
Returns:
the running split timer

createName

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.

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



Copyright © 2003-2014 Atlassian. All Rights Reserved.