public final class MultiQueuePolicy extends Object implements Policy
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.
| Constructor and Description |
|---|
MultiQueuePolicy(com.typesafe.config.Config config) |
| Modifier and Type | Method and Description |
|---|---|
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