Class CampPolicy
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.policy.greedy_dual.CampPolicy
-
- All Implemented Interfaces:
Policy
public final class CampPolicy extends Object implements Policy
CAMP algorithm.The algorithm is explained by the authors in CAMP: A Cost Adaptive Multi-Queue Eviction Policy for Key-Value Stores. This is 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.
-
-
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 CampPolicy(Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinished()Indicates that the recording has completed.voidrecord(AccessEvent event)Records that the entry was accessed.PolicyStatsstats()Returns the cache efficiency statistics.
-
-
-
Constructor Detail
-
CampPolicy
public CampPolicy(Config config)
-
-
Method Detail
-
record
public void record(AccessEvent event)
Description copied from interface:PolicyRecords that the entry was accessed.
-
stats
public PolicyStats stats()
Description copied from interface:PolicyReturns the cache efficiency statistics.
-
-