Class References.WeakValueReference<V>

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

static final class References.WeakValueReference<V> extends WeakReference<V> implements References.InternalReference<V>
The value in a cache that holds values weakly. This class retains a reference to the key in the advent that the value is reclaimed so that the entry can be removed from the cache in constant time.
  • Field Details

    • keyReference

      private final Object keyReference
  • Constructor Details

    • WeakValueReference

      public WeakValueReference(@Nonnull Object keyReference, @Nullable V value, @Nullable ReferenceQueue<V> queue)
  • Method Details