ehcache

net.sf.ehcache.store.chm
Class SelectableConcurrentHashMap.Segment

java.lang.Object
  extended by java.util.concurrent.locks.ReentrantReadWriteLock
      extended by net.sf.ehcache.store.chm.SelectableConcurrentHashMap.Segment
All Implemented Interfaces:
Serializable, ReadWriteLock
Enclosing class:
SelectableConcurrentHashMap

public class SelectableConcurrentHashMap.Segment
extends ReentrantReadWriteLock

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.locks.ReentrantReadWriteLock
ReentrantReadWriteLock.ReadLock, ReentrantReadWriteLock.WriteLock
 
Field Summary
protected  int count
          The number of elements in this segment's region.
protected  SelectableConcurrentHashMap.HashEntry[] table
          The per-segment table.
 
Constructor Summary
protected SelectableConcurrentHashMap.Segment(int initialCapacity, float lf)
           
 
Method Summary
protected  void clear()
           
protected  SelectableConcurrentHashMap.HashEntry createHashEntry(Object key, int hash, SelectableConcurrentHashMap.HashEntry next, Element value, long sizeOf)
           
protected  SelectableConcurrentHashMap.HashEntry getFirst(int hash)
          Returns properly casted first entry of bin for given hash.
protected  Iterator<SelectableConcurrentHashMap.HashEntry> iterator()
           
protected  void postInstall(Object key, Element value)
           
protected  void preRemove(SelectableConcurrentHashMap.HashEntry e)
           
protected  Element put(Object key, int hash, Element value, long sizeOf, boolean onlyIfAbsent, boolean fire)
           
 void recalculateSize(Object key, int hash)
           
protected  SelectableConcurrentHashMap.HashEntry relinkHashEntry(SelectableConcurrentHashMap.HashEntry e, SelectableConcurrentHashMap.HashEntry next)
           
 
Methods inherited from class java.util.concurrent.locks.ReentrantReadWriteLock
getOwner, getQueuedReaderThreads, getQueuedThreads, getQueuedWriterThreads, getQueueLength, getReadHoldCount, getReadLockCount, getWaitingThreads, getWaitQueueLength, getWriteHoldCount, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isWriteLocked, isWriteLockedByCurrentThread, readLock, toString, writeLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

count

protected volatile int count
The number of elements in this segment's region.


table

protected volatile SelectableConcurrentHashMap.HashEntry[] table
The per-segment table.

Constructor Detail

SelectableConcurrentHashMap.Segment

protected SelectableConcurrentHashMap.Segment(int initialCapacity,
                                              float lf)
Method Detail

preRemove

protected void preRemove(SelectableConcurrentHashMap.HashEntry e)

postInstall

protected void postInstall(Object key,
                           Element value)

getFirst

protected SelectableConcurrentHashMap.HashEntry getFirst(int hash)
Returns properly casted first entry of bin for given hash.


createHashEntry

protected SelectableConcurrentHashMap.HashEntry createHashEntry(Object key,
                                                                int hash,
                                                                SelectableConcurrentHashMap.HashEntry next,
                                                                Element value,
                                                                long sizeOf)

relinkHashEntry

protected SelectableConcurrentHashMap.HashEntry relinkHashEntry(SelectableConcurrentHashMap.HashEntry e,
                                                                SelectableConcurrentHashMap.HashEntry next)

clear

protected void clear()

recalculateSize

public void recalculateSize(Object key,
                            int hash)

put

protected Element put(Object key,
                      int hash,
                      Element value,
                      long sizeOf,
                      boolean onlyIfAbsent,
                      boolean fire)

iterator

protected Iterator<SelectableConcurrentHashMap.HashEntry> iterator()

ehcache

Copyright 2001-2015, Terracotta, Inc.