Class AccessEvent
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.policy.AccessEvent
-
public class AccessEvent extends Object
The key and metadata for accessing a cache.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static AccessEventforKey(long key)Returns an event for the given key.static AccessEventforKeyAndPenalties(long key, double hitPenalty, double missPenalty)Returns an event for the given key and penalties.static AccessEventforKeyAndWeight(long key, int weight)Returns an event for the given key and weight.inthashCode()doublehitPenalty()Returns the hit penalty of the entry.booleanisPenaltyAware()Returns if the trace supplies the hit/miss penalty for this entry.longkey()Returns the key.doublemissPenalty()Returns the miss penalty of the entry.StringtoString()intweight()Returns the weight of the entry.
-
-
-
Method Detail
-
key
public long key()
Returns the key.
-
weight
public int weight()
Returns the weight of the entry.
-
hitPenalty
public double hitPenalty()
Returns the hit penalty of the entry.
-
missPenalty
public double missPenalty()
Returns the miss penalty of the entry.
-
isPenaltyAware
public boolean isPenaltyAware()
Returns if the trace supplies the hit/miss penalty for this entry.
-
forKey
public static AccessEvent forKey(long key)
Returns an event for the given key.
-
forKeyAndWeight
public static AccessEvent forKeyAndWeight(long key, int weight)
Returns an event for the given key and weight.
-
forKeyAndPenalties
public static AccessEvent forKeyAndPenalties(long key, double hitPenalty, double missPenalty)
Returns an event for the given key and penalties.
-
-