Each Segment holds a count and table corresponding to a segment of the table. This class contains only those methods for directly assigning these fields, which must only be called while holding locks.
Constructor and description |
---|
CustomConcurrentHashMap.Segment
() |
Type | Name and description |
---|---|
void |
clearCount() |
void |
decrementCount() |
Node[] |
getTableForAdd(CustomConcurrentHashMap cchm) |
Node[] |
getTableForTraversal() |
void |
incrementCount() |
Node[] |
resizeTable(CustomConcurrentHashMap cchm) See the similar code in ConcurrentHashMap for explanation. |
Methods inherited from class | Name |
---|---|
class java.util.concurrent.locks.ReentrantLock |
java.util.concurrent.locks.ReentrantLock#lock(), java.util.concurrent.locks.ReentrantLock#toString(), java.util.concurrent.locks.ReentrantLock#getHoldCount(), java.util.concurrent.locks.ReentrantLock#getQueueLength(), java.util.concurrent.locks.ReentrantLock#getWaitQueueLength(java.util.concurrent.locks.Condition), java.util.concurrent.locks.ReentrantLock#hasQueuedThread(java.lang.Thread), java.util.concurrent.locks.ReentrantLock#hasQueuedThreads(), java.util.concurrent.locks.ReentrantLock#hasWaiters(java.util.concurrent.locks.Condition), java.util.concurrent.locks.ReentrantLock#isFair(), java.util.concurrent.locks.ReentrantLock#isHeldByCurrentThread(), java.util.concurrent.locks.ReentrantLock#isLocked(), java.util.concurrent.locks.ReentrantLock#lockInterruptibly(), java.util.concurrent.locks.ReentrantLock#newCondition(), java.util.concurrent.locks.ReentrantLock#tryLock(long, java.util.concurrent.TimeUnit), java.util.concurrent.locks.ReentrantLock#tryLock(), java.util.concurrent.locks.ReentrantLock#unlock(), java.util.concurrent.locks.ReentrantLock#wait(), java.util.concurrent.locks.ReentrantLock#wait(long, int), java.util.concurrent.locks.ReentrantLock#wait(long), java.util.concurrent.locks.ReentrantLock#equals(java.lang.Object), java.util.concurrent.locks.ReentrantLock#hashCode(), java.util.concurrent.locks.ReentrantLock#getClass(), java.util.concurrent.locks.ReentrantLock#notify(), java.util.concurrent.locks.ReentrantLock#notifyAll() |
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
See the similar code in ConcurrentHashMap for explanation.
Copyright © 2008–2014 Václav Pech. All Rights Reserved.