facebook4j.management
Class APIStatistics
java.lang.Object
facebook4j.management.APIStatistics
- All Implemented Interfaces:
- APIStatisticsMBean, InvocationStatistics
public class APIStatistics
- extends Object
- implements APIStatisticsMBean
Container for all InvocationStatisticsCalculators in a given API (like Twitter)
- Author:
- Nick Dellamaggiore (nick.dellamaggiore gmail.com)
APIStatistics
public APIStatistics(int historySize)
- Parameters:
historySize
- the number of calls to track (for invocation time averaging)
methodCalled
public void methodCalled(String method,
long time,
boolean success)
- Parameters:
method
- the method invokedtime
- the method execution time
getInvocationStatistics
public Iterable<? extends InvocationStatistics> getInvocationStatistics()
- Specified by:
getInvocationStatistics
in interface APIStatisticsMBean
reset
public void reset()
- Specified by:
reset
in interface InvocationStatistics
getName
public String getName()
- APIStatisticsMBean implementation
- Specified by:
getName
in interface InvocationStatistics
getCallCount
public long getCallCount()
- Specified by:
getCallCount
in interface InvocationStatistics
getErrorCount
public long getErrorCount()
- Specified by:
getErrorCount
in interface InvocationStatistics
getTotalTime
public long getTotalTime()
- Specified by:
getTotalTime
in interface InvocationStatistics
getAverageTime
public long getAverageTime()
- Specified by:
getAverageTime
in interface InvocationStatistics
getMethodLevelSummariesAsString
public Map<String,String> getMethodLevelSummariesAsString()
- Specified by:
getMethodLevelSummariesAsString
in interface APIStatisticsMBean
getMethodLevelSummary
public String getMethodLevelSummary(String methodName)
- Specified by:
getMethodLevelSummary
in interface APIStatisticsMBean
Copyright © 2019. All rights reserved.