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
-
Method Summary
Modifier and TypeMethodDescriptionlong
return average timelong
return call countlong
return error countIterable<? extends InvocationStatistics>
getMethodLevelSummary
(String methodName) getName()
APIStatisticsMBean implementationlong
returns total timevoid
methodCalled
(String method, long time, boolean success) void
reset()
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:
getInvocationStatistics
in interfaceAPIStatisticsMBean
- Returns:
- InvocationStatistics
-
reset
public void reset()Description copied from interface:InvocationStatistics
reset statistics- Specified by:
reset
in interfaceInvocationStatistics
-
getName
APIStatisticsMBean implementation- Specified by:
getName
in interfaceInvocationStatistics
- Returns:
- name
-
getCallCount
public long getCallCount()Description copied from interface:InvocationStatistics
return call count- Specified by:
getCallCount
in interfaceInvocationStatistics
- Returns:
- call count
-
getErrorCount
public long getErrorCount()Description copied from interface:InvocationStatistics
return error count- Specified by:
getErrorCount
in interfaceInvocationStatistics
- Returns:
- error count
-
getTotalTime
public long getTotalTime()Description copied from interface:InvocationStatistics
returns total time- Specified by:
getTotalTime
in interfaceInvocationStatistics
- Returns:
- total time
-
getAverageTime
public long getAverageTime()Description copied from interface:InvocationStatistics
return average time- Specified by:
getAverageTime
in interfaceInvocationStatistics
- Returns:
- average time
-
getMethodLevelSummariesAsString
- Specified by:
getMethodLevelSummariesAsString
in interfaceAPIStatisticsMBean
- Returns:
- method level summaries
-
getMethodLevelSummary
- Specified by:
getMethodLevelSummary
in interfaceAPIStatisticsMBean
- Parameters:
methodName
- method name- Returns:
- method level summary
-