Class DefaultActivityMonitor
java.lang.Object
com.atlassian.confluence.util.profiling.DefaultActivityMonitor
- All Implemented Interfaces:
- ActivityMonitor
@Internal
@ParametersAreNonnullByDefault
public class DefaultActivityMonitor
extends Object
implements ActivityMonitor
- Since:
- 5.7
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription@NonNull ActivityregisterStart(String userId, String type, String summary) Starts tracking an activity using the current thread.@NonNull Collection<ActivitySnapshot> Returns an immutable snapshot of the current activity in the system.
- 
Constructor Details- 
DefaultActivityMonitorpublic DefaultActivityMonitor()
 
- 
- 
Method Details- 
registerStartDescription copied from interface:ActivityMonitorStarts tracking an activity using the current thread. The caller must callActivity.close()on the returnedActivityafter the activity has completed.The typical usage is: final Activity activity = activityMonitor.registerStart(userId, type, summary); try { // code to execute } finally { activity.close(); }Under Java 7, the following is also possible: try (Activity activity = activityMonitor.registerStart(userId, type, summary)) { // code to execute }- Specified by:
- registerStartin interface- ActivityMonitor
- Parameters:
- userId- the identifier of the user associated with the activity.
- type- the type of activity being performed. E.g. web-request
- summary- a textual summary of the activity. E.g. /some/url.action
 
- 
snapshotCurrentDescription copied from interface:ActivityMonitorReturns an immutable snapshot of the current activity in the system.- Specified by:
- snapshotCurrentin interface- ActivityMonitor
- Returns:
- an immutable snapshot of the current activity in the system.
 
 
-