Enum SampledPolicy.EvictionPolicy
- java.lang.Object
-
- java.lang.Enum<SampledPolicy.EvictionPolicy>
-
- com.github.benmanes.caffeine.cache.simulator.policy.sampled.SampledPolicy.EvictionPolicy
-
- All Implemented Interfaces:
Serializable,Comparable<SampledPolicy.EvictionPolicy>
- Enclosing class:
- SampledPolicy
public static enum SampledPolicy.EvictionPolicy extends Enum<SampledPolicy.EvictionPolicy>
The replacement policy.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FIFOEvicts entries based on insertion order.HYPERBOLICEvicts entries based on how frequently they are used divided by their age.LFUEvicts entries based on how frequently they are used, with the least frequent evicted first.LRUEvicts entries based on how recently they are used, with the least recent evicted first.MFUEvicts entries based on how frequently they are used, with the most frequent evicted first.MRUEvicts entries based on how recently they are used, with the least recent evicted first.RANDOMEvicts a random entry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringlabel()static SampledPolicy.EvictionPolicyvalueOf(String name)Returns the enum constant of this type with the specified name.static SampledPolicy.EvictionPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FIFO
public static final SampledPolicy.EvictionPolicy FIFO
Evicts entries based on insertion order.
-
LRU
public static final SampledPolicy.EvictionPolicy LRU
Evicts entries based on how recently they are used, with the least recent evicted first.
-
MRU
public static final SampledPolicy.EvictionPolicy MRU
Evicts entries based on how recently they are used, with the least recent evicted first.
-
LFU
public static final SampledPolicy.EvictionPolicy LFU
Evicts entries based on how frequently they are used, with the least frequent evicted first.
-
MFU
public static final SampledPolicy.EvictionPolicy MFU
Evicts entries based on how frequently they are used, with the most frequent evicted first.
-
RANDOM
public static final SampledPolicy.EvictionPolicy RANDOM
Evicts a random entry.
-
HYPERBOLIC
public static final SampledPolicy.EvictionPolicy HYPERBOLIC
Evicts entries based on how frequently they are used divided by their age.
-
-
Method Detail
-
values
public static SampledPolicy.EvictionPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SampledPolicy.EvictionPolicy c : SampledPolicy.EvictionPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SampledPolicy.EvictionPolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
label
public String label()
-
-