Class CartPolicy
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.policy.adaptive.CartPolicy
-
- All Implemented Interfaces:
Policy,Policy.KeyOnlyPolicy
public final class CartPolicy extends Object implements Policy.KeyOnlyPolicy
CAR with Temporal filtering policy. This algorithm differs from CAR by maintaining a temporal locality window such that pages that are re-requested within the window are of short-term utility and pages that are re-requested outside the window are of long-term utility. The temporal locality window is an adaptable parameter of the algorithm.This implementation is based on the pseudocode provided by the authors in their paper CAR: Clock with Adaptive Replacement and is further described in their paper,
This algorithm is patented by IBM (6996676, 7096321, 7058766, 8612689).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.benmanes.caffeine.cache.simulator.policy.Policy
Policy.Characteristic, Policy.KeyOnlyPolicy, Policy.PolicySpec
-
-
Constructor Summary
Constructors Constructor Description CartPolicy(Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinished()Indicates that the recording has completed.voidrecord(long key)PolicyStatsstats()Returns the cache efficiency statistics.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.benmanes.caffeine.cache.simulator.policy.Policy.KeyOnlyPolicy
record
-
-
-
-
Constructor Detail
-
CartPolicy
public CartPolicy(Config config)
-
-
Method Detail
-
record
public void record(long key)
- Specified by:
recordin interfacePolicy.KeyOnlyPolicy
-
stats
public PolicyStats stats()
Description copied from interface:PolicyReturns the cache efficiency statistics.
-
-