org.compass.core.util.backport.java.util.concurrent
Class ConcurrentHashMap.WriteThroughEntry
java.lang.Object
org.compass.core.util.backport.java.util.AbstractMap.SimpleEntry
org.compass.core.util.backport.java.util.concurrent.ConcurrentHashMap.WriteThroughEntry
- All Implemented Interfaces:
- Map.Entry
- Enclosing class:
- ConcurrentHashMap
final class ConcurrentHashMap.WriteThroughEntry
- extends AbstractMap.SimpleEntry
Custom Entry class used by EntryIterator.next(), that relays
setValue changes to the underlying map.
ConcurrentHashMap.WriteThroughEntry
ConcurrentHashMap.WriteThroughEntry(Object k,
Object v)
setValue
public Object setValue(Object value)
- Set our entry's value and write through to the map. The
value to return is somewhat arbitrary here. 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.
- Specified by:
setValue in interface Map.Entry- Overrides:
setValue in class AbstractMap.SimpleEntry
- Parameters:
value - new value to be stored in this entry
- Returns:
- the old value corresponding to the entry
Copyright (c) 2004-2006 The Compass Project.