Class ConcurrentReferenceHashMap.WriteThroughEntry

All Implemented Interfaces:
Serializable, Map.Entry<K,V>
Enclosing class:

protected class ConcurrentReferenceHashMap.WriteThroughEntry extends ConcurrentReferenceHashMap.SimpleEntry<K,V>
Custom Entry class used by, that relays setValue changes to the underlying map.
See Also:
  • Constructor Details

    • WriteThroughEntry

      protected WriteThroughEntry(K k, V v)
  • Method Details

    • setValue

      public V setValue(V value)
      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.
      Specified by:
      setValue in interface Map.Entry<K,V>
      setValue in class ConcurrentReferenceHashMap.SimpleEntry<K,V>