Class AtlassianInstrumentation
- java.lang.Object
-
- com.atlassian.confluence.util.profiling.AtlassianInstrumentation
-
public class AtlassianInstrumentation extends Object
A mechanism to allow Hibernate instrumentation data to be recorded using the host Atlassian products infrastructure. By default no data is recorded. The host product needs to callregisterFactory(AtlasSplitFactory)
to register a factory that will createAtlassianInstrumentation.AtlasSplit
instances. Factory can be unregistered with a call tounregisterFactory(AtlasSplitFactory)
. Multiple factories are supported.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AtlassianInstrumentation.AtlasSplit
Represents a timer split.static interface
AtlassianInstrumentation.AtlasSplitFactory
Represents a factory for creatingAtlassianInstrumentation.AtlasSplit
.
-
Constructor Summary
Constructors Constructor Description AtlassianInstrumentation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
registerFactory(AtlassianInstrumentation.AtlasSplitFactory factory)
Register a factory for use.static AtlassianInstrumentation.AtlasSplit
startSplit(String name)
Create a started split, using the registered factory.static void
unregisterFactory(AtlassianInstrumentation.AtlasSplitFactory factory)
Unregister a factory.
-
-
-
Method Detail
-
registerFactory
public static void registerFactory(AtlassianInstrumentation.AtlasSplitFactory factory)
Register a factory for use.- Parameters:
factory
- the factory for use. If null, then no factory is registered.
-
unregisterFactory
public static void unregisterFactory(AtlassianInstrumentation.AtlasSplitFactory factory)
Unregister a factory.- Parameters:
factory
- the factory to unregister. If null, then no factory is unregistered.
-
startSplit
public static AtlassianInstrumentation.AtlasSplit startSplit(String name)
Create a started split, using the registered factory. If no factory is registered, then a NOP instance is returned instead.- Parameters:
name
- the name of the timer to associate the split time with.- Returns:
- an instance for use. Will never be null.
-
-