public static class WeakSoftTable.SoftValue extends SoftReference implements WeakSoftTable.RemovableReference
Modifier and Type | Field and Description |
---|---|
protected WeakSoftTable.WeakKey |
key
The associated key.
|
Modifier | Constructor and Description |
---|---|
protected |
SoftValue(WeakSoftTable.SoftValue softValue,
ReferenceQueue queue)
Creates a copy of the value registered with the queue.
|
|
SoftValue(WeakSoftTable.WeakKey key,
Object value)
Creates a value for the associated key that retains a soft reference
to value.
|
Modifier and Type | Method and Description |
---|---|
void |
cleared(Map map)
Called with the containing map when this instance's reference is
cleared, to remove the associated entry from the map.
|
WeakSoftTable.RemovableReference |
copy(ReferenceQueue queue)
Returns a copy of this instance registered with the specified queue.
|
get
clear, enqueue, isEnqueued
protected final WeakSoftTable.WeakKey key
public SoftValue(WeakSoftTable.WeakKey key, Object value)
protected SoftValue(WeakSoftTable.SoftValue softValue, ReferenceQueue queue)
public WeakSoftTable.RemovableReference copy(ReferenceQueue queue)
WeakSoftTable.RemovableReference
copy
in interface WeakSoftTable.RemovableReference
queue
- the queue with which this instance should be registeredpublic void cleared(Map map)
WeakSoftTable.RemovableReference
cleared
in interface WeakSoftTable.RemovableReference
map
- the map from which this newly cleared instance should be
removedCopyright © 2016–2018. All rights reserved.