public final class LirsPolicy extends Object implements Policy.KeyOnlyPolicy
The authors do not provide a recommendation for setting the maximum number of non-resident HIR blocks. To avoid unbounded memory usage, these blocks are placed on a non-resident queue to allow immediate removal, when a non-resident size limit is reached, instead of searching the stack.
The algorithm is explained by the authors in LIRS: An Efficient Low Inter-reference Recency Set Replacement Policy to Improve Buffer Cache Performance and Making LRU Friendly to Weak Locality Workloads: A Novel Replacement Algorithm to Improve Buffer Cache Performance.
Policy.Characteristic, Policy.KeyOnlyPolicy, Policy.PolicySpec| Constructor and Description |
|---|
LirsPolicy(Config config) |
| Modifier and Type | Method and Description |
|---|---|
void |
finished()
Indicates that the recording has completed.
|
void |
record(long key) |
PolicyStats |
stats()
Returns the cache efficiency statistics.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrecordpublic LirsPolicy(Config config)
public void record(long key)
record in interface Policy.KeyOnlyPolicypublic PolicyStats stats()
Policy