static interface MapMakerInternalMap.ValueReference<K,V>
Modifier and Type | Method and Description |
---|---|
void |
clear(MapMakerInternalMap.ValueReference<K,V> newValue)
Clears this reference object.
|
MapMakerInternalMap.ValueReference<K,V> |
copyFor(java.lang.ref.ReferenceQueue<V> queue,
V value,
MapMakerInternalMap.ReferenceEntry<K,V> entry)
Creates a copy of this reference for the given entry.
|
V |
get()
Gets the value.
|
MapMakerInternalMap.ReferenceEntry<K,V> |
getEntry()
Returns the entry associated with this value reference, or
null if this value
reference is independent of any entry. |
boolean |
isComputingReference()
Returns
true if the value type is a computing reference (regardless of whether or not
computation has completed). |
V |
waitForValue()
Waits for a value that may still be computing.
|
V get()
V waitForValue() throws java.util.concurrent.ExecutionException
java.util.concurrent.ExecutionException
- if the computing thread throws an exceptionMapMakerInternalMap.ReferenceEntry<K,V> getEntry()
null
if this value
reference is independent of any entry.MapMakerInternalMap.ValueReference<K,V> copyFor(java.lang.ref.ReferenceQueue<V> queue, @Nullable V value, MapMakerInternalMap.ReferenceEntry<K,V> entry)
value
may be null only for a loading reference.
void clear(@Nullable MapMakerInternalMap.ValueReference<K,V> newValue)
newValue
- the new value reference which will replace this one; this is only used during
computation to immediately notify blocked threads of the new valueboolean isComputingReference()
true
if the value type is a computing reference (regardless of whether or not
computation has completed). This is necessary to distiguish between partially-collected
entries and computing entries, which need to be cleaned up differently.