Class UnboundedPolicy
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.policy.opt.UnboundedPolicy
-
- All Implemented Interfaces:
Policy
public final class UnboundedPolicy extends Object implements Policy
A cache that has no maximum size. This demonstrates the upper bound of the hit rate due to compulsory misses (first reference misses), which can only be avoided if the application can intelligently prefetch the data prior to the request.
-
-
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 UnboundedPolicy(Config config, Set<Policy.Characteristic> characteristics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrecord(AccessEvent event)Records that the entry was accessed.PolicyStatsstats()Returns the cache efficiency statistics.
-
-
-
Constructor Detail
-
UnboundedPolicy
public UnboundedPolicy(Config config, Set<Policy.Characteristic> characteristics)
-
-
Method Detail
-
stats
public PolicyStats stats()
Description copied from interface:PolicyReturns the cache efficiency statistics.
-
record
public void record(AccessEvent event)
Description copied from interface:PolicyRecords that the entry was accessed.
-
-