public final class LirsPolicy extends Object implements Policy
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.
| Constructor and Description |
|---|
LirsPolicy(com.typesafe.config.Config config) |
| Modifier and Type | Method and Description |
|---|---|
void |
finished()
Indicates that the recording has completed.
|
static Set<Policy> |
policies(com.typesafe.config.Config config)
Returns all variations of this policy based on the configuration parameters.
|
void |
record(long key)
Records that the entry was accessed.
|
PolicyStats |
stats()
Returns the cache efficiency statistics.
|
public static Set<Policy> policies(com.typesafe.config.Config config)
public void record(long key)
Policypublic PolicyStats stats()
Policy