Interface ReferenceEntry<K,V>

All Known Implementing Classes:
LocalCache.AbstractReferenceEntry, LocalCache.NullEntry, LocalCache.StrongAccessEntry, LocalCache.StrongAccessWriteEntry, LocalCache.StrongEntry, LocalCache.StrongWriteEntry, LocalCache.WeakAccessEntry, LocalCache.WeakAccessWriteEntry, LocalCache.WeakEntry, LocalCache.WeakWriteEntry

interface ReferenceEntry<K,V>
An entry in a reference map.

Entries in the map can be in the following states:

Valid:

  • Live: valid key/value are set
  • Loading: loading is pending

Invalid:

  • Expired: time expired (key/value may still be set)
  • Collected: key/value was partially collected, but not yet cleaned up
  • Unset: marked as unset, awaiting cleanup or reuse
  • Method Details

    • getValueReference

      @CheckForNull LocalCache.ValueReference<K,V> getValueReference()
      Returns the value reference from this entry.
    • setValueReference

      void setValueReference(LocalCache.ValueReference<K,V> valueReference)
      Sets the value reference for this entry.
    • getNext

      @CheckForNull ReferenceEntry<K,V> getNext()
      Returns the next entry in the chain.
    • getHash

      int getHash()
      Returns the entry's hash.
    • getKey

      @CheckForNull K getKey()
      Returns the key for this entry.
    • getAccessTime

      long getAccessTime()
      Returns the time that this entry was last accessed, in ns.
    • setAccessTime

      void setAccessTime(long time)
      Sets the entry access time in ns.
    • getNextInAccessQueue

      ReferenceEntry<K,V> getNextInAccessQueue()
      Returns the next entry in the access queue.
    • setNextInAccessQueue

      void setNextInAccessQueue(ReferenceEntry<K,V> next)
      Sets the next entry in the access queue.
    • getPreviousInAccessQueue

      ReferenceEntry<K,V> getPreviousInAccessQueue()
      Returns the previous entry in the access queue.
    • setPreviousInAccessQueue

      void setPreviousInAccessQueue(ReferenceEntry<K,V> previous)
      Sets the previous entry in the access queue.
    • getWriteTime

      long getWriteTime()
    • setWriteTime

      void setWriteTime(long time)
      Sets the entry write time in ns.
    • getNextInWriteQueue

      ReferenceEntry<K,V> getNextInWriteQueue()
      Returns the next entry in the write queue.
    • setNextInWriteQueue

      void setNextInWriteQueue(ReferenceEntry<K,V> next)
      Sets the next entry in the write queue.
    • getPreviousInWriteQueue

      ReferenceEntry<K,V> getPreviousInWriteQueue()
      Returns the previous entry in the write queue.
    • setPreviousInWriteQueue

      void setPreviousInWriteQueue(ReferenceEntry<K,V> previous)
      Sets the previous entry in the write queue.