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 IService
public 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 IService
public long getCacheHits()
getCacheHits
in interface IService
public long getFailures()
getFailures
in interface IService
public Long getMaxResponseTime()
getMaxResponseTime
in interface IService
public Long getMinResponseTime()
getMinResponseTime
in interface IService
public Double getAvgResponseTimeWithCache()
getAvgResponseTimeWithCache
in interface IService
public Long getMaxResponseTimeWithCache()
getMaxResponseTimeWithCache
in interface IService
public Long getMinResponseTimeWithCache()
getMinResponseTimeWithCache
in interface IService
public double getAvgNestedCalls()
getAvgNestedCalls
in interface IService
public double getAvgNestedCallsWithCache()
getAvgNestedCallsWithCache
in interface IService
public int compareTo(IService otherService)
compareTo
in interface Comparable<IService>
public double getCurrentRate()
getCurrentRate
in interface IService
Copyright © 2010–2016. All rights reserved.