EDU.oswego.cs.dl.util.concurrent
Class ConcurrentHashMap.Segment
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap.Segment
- Enclosing class:
- ConcurrentHashMap
- protected static final class ConcurrentHashMap.Segment
- extends Object
Bookkeeping for each concurrency control segment.
Each segment contains a local count of the number of
elements in its region.
However, the main use of a Segment is for its lock.
Field Summary |
protected int |
count
The number of elements in this segment's region. |
Method Summary |
protected int |
getCount()
Get the count under synch. |
protected void |
synch()
Force a synchronization |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
count
protected int count
- The number of elements in this segment's region.
It is always updated within synchronized blocks.
ConcurrentHashMap.Segment
protected ConcurrentHashMap.Segment()
getCount
protected int getCount()
- Get the count under synch.
synch
protected void synch()
- Force a synchronization