|
|||||||||
| 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 CacheObjects 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 count| Method Detail |
|---|
public final double hitRatio()
Cache.StatisticCacheObjects to total
requests through Cache.get(Object).
This value is obtained through
ratio = (hits / (hits + misses)).
hitRatio in interface Cache.Statisticpublic final long hits()
Cache.StatisticCache.get(Object) for a CacheObject.
hits in interface Cache.Statisticpublic final long misses()
Cache.StatisticCacheObject 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 | ||||||||