Class AtlassianInstrumentation
java.lang.Object
com.atlassian.confluence.util.profiling.AtlassianInstrumentation
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 call
registerFactory(AtlasSplitFactory)
to register a
factory that will create AtlassianInstrumentation.AtlasSplit
instances. Factory
can be unregistered with a call to unregisterFactory(AtlasSplitFactory)
. Multiple factories are supported.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Represents a timer split.static interface
Represents a factory for creatingAtlassianInstrumentation.AtlasSplit
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Register a factory for use.startSplit
(String name) Create a started split, using the registered factory.static void
Unregister a factory.
-
Constructor Details
-
AtlassianInstrumentation
public AtlassianInstrumentation()
-
-
Method Details
-
registerFactory
Register a factory for use.- Parameters:
factory
- the factory for use. If null, then no factory is registered.
-
unregisterFactory
Unregister a factory.- Parameters:
factory
- the factory to unregister. If null, then no factory is unregistered.
-
startSplit
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.
-