public class APIStatistics extends Object implements APIStatisticsMBean
| Constructor and Description |
|---|
APIStatistics(int historySize) |
| Modifier and Type | Method and Description |
|---|---|
long |
getAverageTime() |
long |
getCallCount() |
long |
getErrorCount() |
Iterable<? extends InvocationStatistics> |
getInvocationStatistics() |
Map<String,String> |
getMethodLevelSummariesAsString() |
String |
getMethodLevelSummary(String methodName) |
String |
getName()
APIStatisticsMBean implementation
|
long |
getTotalTime() |
void |
methodCalled(String method,
long time,
boolean success) |
void |
reset() |
public APIStatistics(int historySize)
historySize - the number of calls to track (for invocation time averaging)public void methodCalled(String method, long time, boolean success)
method - the method invokedtime - the method execution timesuccess - successpublic Iterable<? extends InvocationStatistics> getInvocationStatistics()
getInvocationStatistics in interface APIStatisticsMBeanpublic void reset()
reset in interface InvocationStatisticspublic String getName()
getName in interface InvocationStatisticspublic long getCallCount()
getCallCount in interface InvocationStatisticspublic long getErrorCount()
getErrorCount in interface InvocationStatisticspublic long getTotalTime()
getTotalTime in interface InvocationStatisticspublic long getAverageTime()
getAverageTime in interface InvocationStatisticspublic Map<String,String> getMethodLevelSummariesAsString()
getMethodLevelSummariesAsString in interface APIStatisticsMBeanpublic String getMethodLevelSummary(String methodName)
getMethodLevelSummary in interface APIStatisticsMBeanCopyright © 2018. All rights reserved.