public class SelectableConcurrentHashMap.Segment extends ReentrantReadWriteLock
ReentrantReadWriteLock.ReadLock, ReentrantReadWriteLock.WriteLock
Modifier and Type | Field and Description |
---|---|
protected int |
count
The number of elements in this segment's region.
|
protected int |
numDummyPinnedKeys |
protected int |
pinnedCount |
protected SelectableConcurrentHashMap.HashEntry[] |
table
The per-segment table.
|
Modifier | Constructor and Description |
---|---|
protected |
SelectableConcurrentHashMap.Segment(int initialCapacity,
float lf) |
Modifier and Type | Method and Description |
---|---|
protected void |
clear() |
protected SelectableConcurrentHashMap.HashEntry |
createHashEntry(Object key,
int hash,
SelectableConcurrentHashMap.HashEntry next,
Element value,
long sizeOf,
boolean pinned) |
protected SelectableConcurrentHashMap.HashEntry |
getFirst(int hash)
Returns properly casted first entry of bin for given hash.
|
boolean |
isPinned(Object key,
int hash) |
protected Iterator<SelectableConcurrentHashMap.HashEntry> |
iterator() |
protected void |
postInstall(Object key,
Element value,
boolean pinned) |
protected void |
preRemove(SelectableConcurrentHashMap.HashEntry e) |
protected Element |
put(Object key,
int hash,
Element value,
long sizeOf,
boolean onlyIfAbsent,
boolean pinned,
boolean fire) |
void |
recalculateSize(Object key,
int hash) |
protected SelectableConcurrentHashMap.HashEntry |
relinkHashEntry(SelectableConcurrentHashMap.HashEntry e,
SelectableConcurrentHashMap.HashEntry next) |
void |
setPinned(Object key,
boolean pinned,
int hash) |
void |
unpinAll() |
getOwner, getQueuedReaderThreads, getQueuedThreads, getQueuedWriterThreads, getQueueLength, getReadHoldCount, getReadLockCount, getWaitingThreads, getWaitQueueLength, getWriteHoldCount, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isWriteLocked, isWriteLockedByCurrentThread, readLock, toString, writeLock
protected volatile int count
protected volatile SelectableConcurrentHashMap.HashEntry[] table
protected volatile int pinnedCount
protected volatile int numDummyPinnedKeys
protected SelectableConcurrentHashMap.Segment(int initialCapacity, float lf)
protected void preRemove(SelectableConcurrentHashMap.HashEntry e)
protected SelectableConcurrentHashMap.HashEntry getFirst(int hash)
public void setPinned(Object key, boolean pinned, int hash)
public boolean isPinned(Object key, int hash)
public void unpinAll()
protected SelectableConcurrentHashMap.HashEntry createHashEntry(Object key, int hash, SelectableConcurrentHashMap.HashEntry next, Element value, long sizeOf, boolean pinned)
protected SelectableConcurrentHashMap.HashEntry relinkHashEntry(SelectableConcurrentHashMap.HashEntry e, SelectableConcurrentHashMap.HashEntry next)
protected void clear()
public void recalculateSize(Object key, int hash)
protected Element put(Object key, int hash, Element value, long sizeOf, boolean onlyIfAbsent, boolean pinned, boolean fire)
protected Iterator<SelectableConcurrentHashMap.HashEntry> iterator()
Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.