Class MultiQueuePolicy

  • All Implemented Interfaces:
    Policy, Policy.KeyOnlyPolicy

    public final class MultiQueuePolicy
    extends Object
    implements Policy.KeyOnlyPolicy
    The MultiQueue algorithm. This algorithm organizes entries into queues that represent a frequency range. When an entry is accessed, it may be promoted to the next higher queue and, regardless, is reordered to the least-recently-used position in the queue it resides in. A non-resident queue retains evicted items that are being monitored (OUT) to allow entries to retain their historic frequency and be eagerly promoted.

    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 pseudocode provided by the authors in their paper The Multi-Queue Replacement Algorithm for Second Level. Buffer Caches.

    • Constructor Detail

      • MultiQueuePolicy

        public MultiQueuePolicy​(Config config)