Package org.alfresco.repo.action
Class ActionServiceMonitor
- java.lang.Object
-
- org.alfresco.repo.action.ActionServiceMonitor
-
public class ActionServiceMonitor extends java.lang.ObjectResponsible for monitoring running actions and accumulating statistics on actions that have been run.- Author:
- Alex Miller
-
-
Constructor Summary
Constructors Constructor Description ActionServiceMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionCompleted(RunningAction action)Called by theActionServiceImplwhen sn action completes.RunningActionactionStarted(Action action)Called by theActionServiceImplwhen an action is started.java.util.List<ActionStatistics>getActionStatisitcs()intgetRunningActionCount()java.util.List<RunningAction>getRunningActions()
-
-
-
Method Detail
-
actionStarted
public RunningAction actionStarted(Action action)
Called by theActionServiceImplwhen an action is started. Adds the action to the list of currently running actions.- Parameters:
action- The action being started- Returns:
- A
RunningActionobject used to track the status of the running action.
-
actionCompleted
public void actionCompleted(RunningAction action)
Called by theActionServiceImplwhen sn action completes. Removes the actions from the list of currently running actions, and updated the accumulated statistics for that action.- Parameters:
action- TheRunningActionobject returned by actionStatred.
-
getRunningActions
public java.util.List<RunningAction> getRunningActions()
- Returns:
- The list of currently running actions.
-
getRunningActionCount
public int getRunningActionCount()
- Returns:
- a count of the currently running actions
-
getActionStatisitcs
public java.util.List<ActionStatistics> getActionStatisitcs()
- Returns:
- a list of the accumulated action statistics.
-
-