org.apache.wicket.util.concurrent
Class ConcurrentHashMap.Segment

java.lang.Object
  extended by org.apache.wicket.util.concurrent.ConcurrentHashMap.Segment
All Implemented Interfaces:
java.io.Serializable, IClusterable
Enclosing class:
ConcurrentHashMap

protected static final class ConcurrentHashMap.Segment
extends java.lang.Object
implements IClusterable

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:
Serialized Form

Field Summary
protected  int count
          The number of elements in this segment's region.
 
Constructor Summary
protected ConcurrentHashMap.Segment()
           
 
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
 

Field Detail

count

protected int count
The number of elements in this segment's region. It is always updated within synchronized blocks.

Constructor Detail

ConcurrentHashMap.Segment

protected ConcurrentHashMap.Segment()
Method Detail

getCount

protected int getCount()
Get the count under synch.

Returns:
count under sync

synch

protected void synch()
Force a synchronization



Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.