Package org.jruby.util.collections
Class ConcurrentWeakHashMap.HashEntry<K,V>
java.lang.Object
org.jruby.util.collections.ConcurrentWeakHashMap.HashEntry<K,V>
- Enclosing class:
- ConcurrentWeakHashMap<K,
V>
ConcurrentWeakHashMap 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
FieldsModifier and TypeFieldDescription(package private) final int(package private) final WeakReference<K>(package private) final ConcurrentWeakHashMap.HashEntry<K,V> (package private) V -
Constructor Summary
ConstructorsConstructorDescriptionHashEntry(K key, int hash, ConcurrentWeakHashMap.HashEntry<K, V> next, V value, ReferenceQueue<K> refQueue) -
Method Summary
Modifier and TypeMethodDescription(package private) static final <K,V> ConcurrentWeakHashMap.HashEntry<K, V>[] newArray(int i)
-
Field Details
-
keyRef
-
hash
final int hash -
value
-
next
-
-
Constructor Details
-
HashEntry
HashEntry(K key, int hash, ConcurrentWeakHashMap.HashEntry<K, V> next, V value, ReferenceQueue<K> refQueue)
-
-
Method Details
-
newArray
-