Class References.WeakKeyReference<K>

java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.WeakReference<K>
com.github.benmanes.caffeine.cache.References.WeakKeyReference<K>
All Implemented Interfaces:
References.InternalReference<K>
Enclosing class:
References

static class References.WeakKeyReference<K> extends WeakReference<K> implements References.InternalReference<K>
The key in a cache that holds keys weakly. This class retains the key's identity hash code in the advent that the key is reclaimed so that the entry can be removed from the cache in constant time.
  • Field Details

    • hashCode

      private final int hashCode
  • Constructor Details

    • WeakKeyReference

      public WeakKeyReference(@Nullable K key, @Nullable ReferenceQueue<K> queue)
  • Method Details