Class AccessEvent


  • public class AccessEvent
    extends Object
    The key and metadata for accessing a cache.
    • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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.