|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.locks.ReentrantLock
java.util.concurrent.ConcurrentHashMap.Segment<K,V>
static final class ConcurrentHashMap.Segment<K,V>
Segments are specialized versions of hash tables. This subclasses from ReentrantLock opportunistically, just to simplify some locking and avoid separate construction.
| Field Summary | |
|---|---|
(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; used for checking lack of modifications in bulk-read methods. |
(package private) ConcurrentHashMap.HashEntry[] |
table
The per-segment table |
(package private) int |
threshold
The table is rehashed when its size exceeds this threshold. |
| Constructor Summary | |
|---|---|
ConcurrentHashMap.Segment(int initialCapacity,
float lf)
|
|
| Method Summary | |
|---|---|
(package private) void |
clear()
|
(package private) boolean |
containsKey(Object key,
int hash)
|
(package private) boolean |
containsValue(Object value)
|
(package private) V |
get(Object key,
int hash)
|
(package private) V |
put(K key,
int hash,
V value,
boolean onlyIfAbsent)
|
(package private) ConcurrentHashMap.HashEntry[] |
rehash(ConcurrentHashMap.HashEntry[] oldTable)
|
(package private) V |
remove(Object key,
int hash,
Object value)
Remove; match on key only if value null, else match both. |
(package private) V |
replace(K key,
int hash,
V newValue)
|
(package private) boolean |
replace(K key,
int hash,
V oldValue,
V newValue)
|
(package private) void |
setTable(ConcurrentHashMap.HashEntry[] newTable)
Set table to new HashEntry array. |
| Methods inherited from class java.util.concurrent.locks.ReentrantLock |
|---|
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
transient volatile int count
transient int modCount
transient int threshold
transient ConcurrentHashMap.HashEntry[] table
final float loadFactor
| Constructor Detail |
|---|
ConcurrentHashMap.Segment(int initialCapacity,
float lf)
| Method Detail |
|---|
void setTable(ConcurrentHashMap.HashEntry[] newTable)
V get(Object key,
int hash)
boolean containsKey(Object key,
int hash)
boolean containsValue(Object value)
boolean replace(K key,
int hash,
V oldValue,
V newValue)
V replace(K key,
int hash,
V newValue)
V put(K key,
int hash,
V value,
boolean onlyIfAbsent)
ConcurrentHashMap.HashEntry[] rehash(ConcurrentHashMap.HashEntry[] oldTable)
V remove(Object key,
int hash,
Object value)
void clear()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||