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 APIStatisticsMBean
public void reset()
reset
in interface InvocationStatistics
public String getName()
getName
in interface InvocationStatistics
public long getCallCount()
getCallCount
in interface InvocationStatistics
public long getErrorCount()
getErrorCount
in interface InvocationStatistics
public long getTotalTime()
getTotalTime
in interface InvocationStatistics
public long getAverageTime()
getAverageTime
in interface InvocationStatistics
public Map<String,String> getMethodLevelSummariesAsString()
getMethodLevelSummariesAsString
in interface APIStatisticsMBean
public String getMethodLevelSummary(String methodName)
getMethodLevelSummary
in interface APIStatisticsMBean
Copyright © 2018. All rights reserved.