@Internal @ParametersAreNonnullByDefault public interface ConfluenceMonitoring
| Modifier and Type | Method and Description |
|---|---|
String |
createName(String name,
String... optional)
Creates a legal name from the supplied mandatory suggestion, and optional extra parts.
|
Counter |
fetchCounter(String name,
String... optional)
Fetches the counter associated with the supplied name details.
|
Split |
startSplit(String name,
String... optional)
Creates and starts a split timer associated with the supplied name details.
|
@Nonnull Counter fetchCounter(String name, String... optional)
createName(String, String...).name - the mandatory suggested nameoptional - the optional parts to concatenate with the mandatory suggestion@Nonnull Split startSplit(String name, String... optional)
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
}
name - the mandatory suggested nameoptional - the optional parts to concatenate with the mandatory suggestion@Nonnull String createName(String name, String... optional)
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:
null or a blank string,
they are replaced with an empty string.
"." separator.
<UNKNOWN> is returned instead.name - the mandatory suggested nameoptional - the optional parts to concatenate with the mandatory suggestionCopyright © 2003–2018 Atlassian. All rights reserved.