public class UniformHitRatio extends Object implements HitRatio
Concurrency properties:
Usage recommendations:
SmoothlyDecayingRollingHitRatio| Constructor and Description |
|---|
UniformHitRatio() |
| Modifier and Type | Method and Description |
|---|---|
double |
getHitRatio()
Returns the ratio between hits and misses
|
void |
update(int hitCount,
int totalCount)
Registers an result of bulk operations.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitincrementHitCount, incrementMissCountpublic void update(int hitCount,
int totalCount)
HitRatioExample of usage:
Set<Something> cachedValues = cache.get(keys);
hitRatio.update(cachedValues.size(), keys.size());
public double getHitRatio()
HitRatiogetHitRatio in interface HitRatioCopyright © 2020. All rights reserved.