public final class MultiQueuePolicy extends Object implements Policy.KeyOnlyPolicy
This policy is designed for second-level caches where a hit in this cache was a miss at the first level. Thus the first-level cache captures most of the recency information and the second-level cache access is dominated by usage frequency.
This implementation is based on the pseudo code provided by the authors in their paper The Multi-Queue Replacement Algorithm for Second Level. Buffer Caches.
Policy.Characteristic, Policy.KeyOnlyPolicy, Policy.PolicySpec| Constructor and Description |
|---|
MultiQueuePolicy(Config config) |
| Modifier and Type | Method and Description |
|---|---|
void |
record(long key) |
PolicyStats |
stats()
Returns the cache efficiency statistics.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrecordpublic MultiQueuePolicy(Config config)
public void record(long key)
record in interface Policy.KeyOnlyPolicypublic PolicyStats stats()
Policy