static final class LocalCache.WeightedWeakValueReference<K,V> extends LocalCache.WeakValueReference<K,V>
Modifier and Type | Field and Description |
---|---|
(package private) int |
weight |
entry
Constructor and Description |
---|
WeightedWeakValueReference(java.lang.ref.ReferenceQueue<V> queue,
V referent,
LocalCache.ReferenceEntry<K,V> entry,
int weight) |
Modifier and Type | Method and Description |
---|---|
LocalCache.ValueReference<K,V> |
copyFor(java.lang.ref.ReferenceQueue<V> queue,
V value,
LocalCache.ReferenceEntry<K,V> entry)
Creates a copy of this reference for the given entry.
|
int |
getWeight()
Returns the weight of this entry.
|
getEntry, isActive, isLoading, notifyNewValue, waitForValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
WeightedWeakValueReference(java.lang.ref.ReferenceQueue<V> queue, V referent, LocalCache.ReferenceEntry<K,V> entry, int weight)
public int getWeight()
LocalCache.ValueReference
getWeight
in interface LocalCache.ValueReference<K,V>
getWeight
in class LocalCache.WeakValueReference<K,V>
public LocalCache.ValueReference<K,V> copyFor(java.lang.ref.ReferenceQueue<V> queue, V value, LocalCache.ReferenceEntry<K,V> entry)
LocalCache.ValueReference
value
may be null only for a loading reference.
copyFor
in interface LocalCache.ValueReference<K,V>
copyFor
in class LocalCache.WeakValueReference<K,V>