Class FeedbackTinyLfuPolicy

  • All Implemented Interfaces:
    Policy, Policy.KeyOnlyPolicy

    public final class FeedbackTinyLfuPolicy
    extends Object
    implements Policy.KeyOnlyPolicy
    The TinyLfu + Lru algorithm where arrival is given more emphasis based on success of previous predictions. If a candidate is rejected multiple times within a sample period then a new arrival is given a higher frequency gain. The gain is decreased on an eviction if no adjustments have been made recently. This allows the policy to dynamically decide whether it should favor recency or frequency based on the workload's characteristics. If the workload changes then the policy will adapt to the new environment.
    • Constructor Detail

      • FeedbackTinyLfuPolicy

        public FeedbackTinyLfuPolicy​(Config config)
    • Method Detail

      • 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