Class EconomyConcurrentHashMap.HashEntry<K,V>
java.lang.Object
com.gigaspaces.internal.utils.collections.economy.EconomyConcurrentHashMap.HashEntry<K,V>
- All Implemented Interfaces:
IHashEntry<K,V>
- Direct Known Subclasses:
EconomyConcurrentHashMap.PinnedHashEntry
- Enclosing class:
- EconomyConcurrentHashMap<K,
V>
public static class EconomyConcurrentHashMap.HashEntry<K,V>
extends Object
implements IHashEntry<K,V>
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetHashCode(int id) getKey(int id) getValue(int id) booleanboolean
-
Constructor Details
-
HashEntry
-
-
Method Details
-
getHashCode
public int getHashCode(int id) - Specified by:
getHashCodein interfaceIHashEntry<K,V>
-
getKey
- Specified by:
getKeyin interfaceIHashEntry<K,V>
-
getValue
- Specified by:
getValuein interfaceIHashEntry<K,V>
-
isNativeHashEntry
public boolean isNativeHashEntry()- Specified by:
isNativeHashEntryin interfaceIHashEntry<K,V> - Returns:
trueif this is a native hashmap entry
-
isPinnedHashEntry
public boolean isPinnedHashEntry()
-