Package EDU.oswego.cs.dl.util.concurrent
Class ConcurrentHashMap.Segment
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap.Segment
- All Implemented Interfaces:
Serializable
- Enclosing class:
ConcurrentHashMap
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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The number of elements in this segment's region. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
count
protected int countThe number of elements in this segment's region. It is always updated within synchronized blocks.
-
-
Constructor Details
-
Segment
protected Segment()
-
-
Method Details
-
getCount
protected int getCount()Get the count under synch. -
synch
protected void synch()Force a synchronization
-