public class Service extends Object implements IService
| Modifier and Type | Field and Description |
|---|---|
protected AtomicLong |
cacheHits |
protected String |
group |
protected AtomicLong |
hits |
protected String |
name |
protected AtomicLong |
running |
| Constructor and Description |
|---|
Service(int minMaxDelay) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCall(Long executionTime,
boolean cacheHit,
boolean failure,
boolean error,
int nestedCalls)
This method is synchronized to ensure correct statistics computation
|
int |
compareTo(IService otherService) |
double |
getAvgNestedCalls() |
double |
getAvgNestedCallsWithCache() |
Double |
getAvgResponseTime() |
Double |
getAvgResponseTimeWithCache() |
long |
getCacheHits() |
double |
getCurrentRate() |
long |
getErrors() |
long |
getFailures() |
String |
getGroup() |
long |
getHits() |
Long |
getMaxResponseTime() |
Long |
getMaxResponseTimeWithCache() |
Long |
getMinResponseTime() |
Long |
getMinResponseTimeWithCache() |
String |
getName() |
long |
getRunning() |
void |
setGroup(String group) |
void |
setName(String name) |
protected AtomicLong cacheHits
protected AtomicLong hits
protected AtomicLong running
protected String name
protected String group
public long getRunning()
getRunning in interface IServicepublic void addCall(Long executionTime, boolean cacheHit, boolean failure, boolean error, int nestedCalls)
executionTime - cacheHit - failure - error - public void setName(String name)
public void setGroup(String group)
public Double getAvgResponseTime()
getAvgResponseTime in interface IServicepublic long getCacheHits()
getCacheHits in interface IServicepublic long getFailures()
getFailures in interface IServicepublic Long getMaxResponseTime()
getMaxResponseTime in interface IServicepublic Long getMinResponseTime()
getMinResponseTime in interface IServicepublic Double getAvgResponseTimeWithCache()
getAvgResponseTimeWithCache in interface IServicepublic Long getMaxResponseTimeWithCache()
getMaxResponseTimeWithCache in interface IServicepublic Long getMinResponseTimeWithCache()
getMinResponseTimeWithCache in interface IServicepublic double getAvgNestedCalls()
getAvgNestedCalls in interface IServicepublic double getAvgNestedCallsWithCache()
getAvgNestedCallsWithCache in interface IServicepublic int compareTo(IService otherService)
compareTo in interface Comparable<IService>public double getCurrentRate()
getCurrentRate in interface IServiceCopyright © 2010–2016. All rights reserved.