Class ConcurrentReferenceHashMap.WriteThroughEntry
java.lang.Object
org.apache.groovy.util.concurrent.ConcurrentReferenceHashMap.SimpleEntry<K,V>
org.apache.groovy.util.concurrent.ConcurrentReferenceHashMap.WriteThroughEntry
- All Implemented Interfaces:
Serializable,Map.Entry<K,V>
- Enclosing class:
- ConcurrentReferenceHashMap<K,
V>
protected class ConcurrentReferenceHashMap.WriteThroughEntry
extends ConcurrentReferenceHashMap.SimpleEntry<K,V>
Custom Entry class used by EntryIterator.next(), that relays setValue
changes to the underlying map.
- See Also:
-
Field Summary
Fields inherited from class org.apache.groovy.util.concurrent.ConcurrentReferenceHashMap.SimpleEntry
key, value -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWriteThroughEntry(K k, V v) Creates a write-through entry backed by the supplied key and value. -
Method Summary
-
Constructor Details
-
WriteThroughEntry
Creates a write-through entry backed by the supplied key and value.- Parameters:
k- the entry keyv- the entry value
-
-
Method Details
-
setValue
Set our entry's value and writes it through to the map. The value to return is somewhat arbitrary: since a WriteThroughEntry does not necessarily track asynchronous changes, the most recent "previous" value could be different from what we return (or could even have been removed in which case the put will re-establish). We do not and cannot guarantee more.
-