net.sf.ehcache.store.chm
Class SelectableConcurrentHashMap.Segment
java.lang.Object
java.util.concurrent.locks.ReentrantReadWriteLock
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
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 |
count
protected volatile int count
- The number of elements in this segment's region.
table
protected volatile SelectableConcurrentHashMap.HashEntry[] table
- The per-segment table.
SelectableConcurrentHashMap.Segment
protected SelectableConcurrentHashMap.Segment(int initialCapacity,
float lf)
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()
Copyright 2001-2017, Terracotta, Inc.