Package twitter4j.management
Class APIStatistics
java.lang.Object
twitter4j.management.APIStatistics
- All Implemented Interfaces:
APIStatisticsMBean,InvocationStatistics
Container for all InvocationStatisticsCalculators in a given API (like Twitter)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongreturn average timelongreturn call countlongreturn error countIterable<? extends InvocationStatistics>getMethodLevelSummary(String methodName) getName()APIStatisticsMBean implementationlongreturns total timevoidmethodCalled(String method, long time, boolean success) voidreset()reset statistics
-
Constructor Details
-
APIStatistics
public APIStatistics(int historySize) - Parameters:
historySize- the number of calls to track (for invocation time averaging)
-
-
Method Details
-
methodCalled
- Parameters:
method- the method invokedtime- the method execution timesuccess- success
-
getInvocationStatistics
- Specified by:
getInvocationStatisticsin interfaceAPIStatisticsMBean- Returns:
- InvocationStatistics
-
reset
public void reset()Description copied from interface:InvocationStatisticsreset statistics- Specified by:
resetin interfaceInvocationStatistics
-
getName
APIStatisticsMBean implementation- Specified by:
getNamein interfaceInvocationStatistics- Returns:
- name
-
getCallCount
public long getCallCount()Description copied from interface:InvocationStatisticsreturn call count- Specified by:
getCallCountin interfaceInvocationStatistics- Returns:
- call count
-
getErrorCount
public long getErrorCount()Description copied from interface:InvocationStatisticsreturn error count- Specified by:
getErrorCountin interfaceInvocationStatistics- Returns:
- error count
-
getTotalTime
public long getTotalTime()Description copied from interface:InvocationStatisticsreturns total time- Specified by:
getTotalTimein interfaceInvocationStatistics- Returns:
- total time
-
getAverageTime
public long getAverageTime()Description copied from interface:InvocationStatisticsreturn average time- Specified by:
getAverageTimein interfaceInvocationStatistics- Returns:
- average time
-
getMethodLevelSummariesAsString
- Specified by:
getMethodLevelSummariesAsStringin interfaceAPIStatisticsMBean- Returns:
- method level summaries
-
getMethodLevelSummary
- Specified by:
getMethodLevelSummaryin interfaceAPIStatisticsMBean- Parameters:
methodName- method name- Returns:
- method level summary
-