Package org.alfresco.repo.action
Class ActionStatistics
- java.lang.Object
-
- org.alfresco.repo.action.ActionStatistics
-
public class ActionStatistics extends Object
Responsible for accumulating and providing statistics on the invocations of a particualr action.- Author:
- Alex Miller
-
-
Constructor Summary
Constructors Constructor Description ActionStatistics(String actionName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAction(RunningAction action)Accumulate statistics from action.StringgetActionName()longgetAverageTime()longgetErrorCount()longgetInvocationCount()
-
-
-
Constructor Detail
-
ActionStatistics
public ActionStatistics(String actionName)
- Parameters:
actionName- The name of the action this object will provide statistics for.
-
-
Method Detail
-
addAction
public void addAction(RunningAction action)
Accumulate statistics from action.
-
getActionName
public String getActionName()
- Returns:
- The name of the actions this object has statistics for
-
getInvocationCount
public long getInvocationCount()
- Returns:
- The number of times the action has been invoked
-
getErrorCount
public long getErrorCount()
- Returns:
- The number of time the invocation of this action has resulted in an exception
-
getAverageTime
public long getAverageTime()
- Returns:
- The average time for the invocation of this action
-
-