Class ClairvoyantPolicy

  • All Implemented Interfaces:
    Policy

    public final class ClairvoyantPolicy
    extends Object
    implements Policy
    Bélády's optimal page replacement policy. The upper bound of the hit rate is estimated by evicting from the cache the item that will next be used farthest into the future.
    • Constructor Detail

      • ClairvoyantPolicy

        public ClairvoyantPolicy​(Config config)
    • Method Detail

      • record

        public void record​(AccessEvent event)
        Description copied from interface: Policy
        Records that the entry was accessed.
        Specified by:
        record in interface Policy
      • stats

        public PolicyStats stats()
        Description copied from interface: Policy
        Returns the cache efficiency statistics.
        Specified by:
        stats in interface Policy
      • finished

        public void finished()
        Description copied from interface: Policy
        Indicates that the recording has completed.
        Specified by:
        finished in interface Policy