|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttuwien.auto.calimero.buffer.cache.StatisticImpl
public class StatisticImpl
Provide basic Cache
information as required by Cache.Statistic
.
This statistics implementation is immutable.
Cache.Statistic
Constructor Summary | |
---|---|
StatisticImpl(long hits,
long misses)
Creates an instance and fills it with data. |
Method Summary | |
---|---|
double |
hitRatio()
Returns the ratio between found CacheObject s to total
requests through Cache.get(Object) . |
long |
hits()
Returns the total number of successful requests with Cache.get(Object) for a CacheObject . |
long |
misses()
Returns the total number of CacheObject not found with
Cache.get(Object) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatisticImpl(long hits, long misses)
hits
- cache hit countmisses
- cache miss countMethod Detail |
---|
public final double hitRatio()
Cache.Statistic
CacheObject
s to total
requests through Cache.get(Object)
.
This value is obtained through
ratio = (hits / (hits + misses))
.
hitRatio
in interface Cache.Statistic
public final long hits()
Cache.Statistic
Cache.get(Object)
for a CacheObject
.
hits
in interface Cache.Statistic
public final long misses()
Cache.Statistic
CacheObject
not found with
Cache.get(Object)
.
misses
in interface Cache.Statistic
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |