Class GDWheelPolicy

  • All Implemented Interfaces:
    Policy

    public final class GDWheelPolicy
    extends Object
    implements Policy
    Greedy Dual Wheel (GD-Wheel) algorithm.

    The algorithm is explained by the authors in GD-Wheel: A Cost-Aware ReplacementPolicy for Key-Value Stores. This a cost-aware cache policy, which takes into account the access times (i.e. the cost of recomputing or fetching the data). This is also a weighted policy, meaning it supports non-uniform entry sizes.

    • Constructor Detail

      • GDWheelPolicy

        public GDWheelPolicy​(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
      • finished

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

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