org.compass.core.util.backport.java.util.concurrent
Class ConcurrentHashMap.HashEntry

java.lang.Object
  extended by org.compass.core.util.backport.java.util.concurrent.ConcurrentHashMap.HashEntry
Enclosing class:
ConcurrentHashMap

static final class ConcurrentHashMap.HashEntry
extends Object

ConcurrentHashMap list entry. Note that this is never exported out as a user-visible Map.Entry. Because the value field is volatile, not final, it is legal wrt the Java Memory Model for an unsynchronized reader to see null instead of initial value when read via a data race. Although a reordering leading to this is not likely to ever actually occur, the Segment.readValueUnderLock method is used as a backup in case a null (pre-initialized) value is ever seen in an unsynchronized access method.


Field Summary
(package private)  int hash
           
(package private)  Object key
           
(package private)  ConcurrentHashMap.HashEntry next
           
(package private)  Object value
           
 
Constructor Summary
ConcurrentHashMap.HashEntry(Object key, int hash, ConcurrentHashMap.HashEntry next, Object value)
           
 
Method Summary
(package private) static ConcurrentHashMap.HashEntry[] newArray(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

final Object key

hash

final int hash

value

volatile Object value

next

final ConcurrentHashMap.HashEntry next
Constructor Detail

ConcurrentHashMap.HashEntry

ConcurrentHashMap.HashEntry(Object key,
                            int hash,
                            ConcurrentHashMap.HashEntry next,
                            Object value)
Method Detail

newArray

static final ConcurrentHashMap.HashEntry[] newArray(int i)


Copyright (c) 2004-2006 The Compass Project.