Class CacheLongKeyLIRS.Entry<V>

java.lang.Object
org.h2.mvstore.cache.CacheLongKeyLIRS.Entry<V>
Type Parameters:
V - the value type
Enclosing class:
CacheLongKeyLIRS<V>

static class CacheLongKeyLIRS.Entry<V> extends Object
A cache entry. Each entry is either hot (low inter-reference recency; LIR), cold (high inter-reference recency; HIR), or non-resident-cold. Hot entries are in the stack only. Cold entries are in the queue, and may be in the stack. Non-resident-cold entries have their value set to null and are in the stack and in the non-resident queue.
  • Field Details

    • key

      final long key
      The key.
    • value

      V value
      The value. Set to null for non-resident-cold entries.
    • reference

      WeakReference<V> reference
      Weak reference to the value. Set to null for resident entries.
    • memory

      final int memory
      The estimated memory used.
    • topMove

      int topMove
      When the item was last moved to the top of the stack.
    • stackNext

      The next entry in the stack.
    • stackPrev

      The previous entry in the stack.
    • queueNext

      The next entry in the queue (either the resident queue or the non-resident queue).
    • queuePrev

      The previous entry in the queue.
    • mapNext

      The next entry in the map (the chained entry).
  • Constructor Details

  • Method Details

    • isHot

      boolean isHot()
      Whether this entry is hot. Cold entries are in one of the two queues.
      Returns:
      whether the entry is hot
    • getValue

      V getValue()
    • getMemory

      int getMemory()