static final class LongConcurrentHashMap.Segment<V>
extends java.util.concurrent.locks.ReentrantLock
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
count
The number of elements in this segment's region.
|
(package private) float |
loadFactor
The load factor for the hash table.
|
(package private) int |
modCount
Number of updates that alter the size of the table.
|
private static long |
serialVersionUID |
(package private) LongConcurrentHashMap.HashEntry<V>[] |
table
The per-segment table.
|
(package private) int |
threshold
The table is rehashed when its size exceeds this threshold.
|
| Constructor and Description |
|---|
Segment(int initialCapacity,
float lf) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
clear() |
(package private) boolean |
containsKey(long key,
int hash) |
(package private) boolean |
containsValue(java.lang.Object value) |
(package private) V |
get(long key,
int hash) |
(package private) LongConcurrentHashMap.HashEntry<V> |
getFirst(int hash)
Returns properly casted first entry of bin for given hash.
|
(package private) static <V> LongConcurrentHashMap.Segment<V>[] |
newArray(int i) |
(package private) V |
put(long key,
int hash,
V value,
boolean onlyIfAbsent) |
(package private) V |
readValueUnderLock(LongConcurrentHashMap.HashEntry<V> e)
Reads value field of an entry under lock.
|
(package private) void |
rehash() |
(package private) V |
remove(long key,
int hash,
java.lang.Object value)
Remove; match on key only if value null, else match both.
|
(package private) V |
replace(long key,
int hash,
V newValue) |
(package private) boolean |
replace(long key,
int hash,
V oldValue,
V newValue) |
(package private) void |
setTable(LongConcurrentHashMap.HashEntry<V>[] newTable)
Sets table to new HashEntry array.
|
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlockprivate static final long serialVersionUID
transient volatile int count
transient int modCount
transient int threshold
transient volatile LongConcurrentHashMap.HashEntry<V>[] table
final float loadFactor
static <V> LongConcurrentHashMap.Segment<V>[] newArray(int i)
void setTable(LongConcurrentHashMap.HashEntry<V>[] newTable)
LongConcurrentHashMap.HashEntry<V> getFirst(int hash)
V readValueUnderLock(LongConcurrentHashMap.HashEntry<V> e)
V get(long key, int hash)
boolean containsKey(long key,
int hash)
boolean containsValue(java.lang.Object value)
void rehash()
V remove(long key, int hash, java.lang.Object value)
void clear()