java.io.Serializable, java.util.concurrent.locks.Lockprotected final class ConcurrentReferenceHashMap.Segment
extends java.util.concurrent.locks.ReentrantLock
| Constructor | Description |
|---|---|
Segment(int initialCapacity) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clear() |
Clear all items from this segment.
|
<T> T |
doTask(int hash,
java.lang.Object key,
com.aspectran.core.util.ConcurrentReferenceHashMap.Task<T> task) |
Apply an update operation to this segment.
|
int |
getCount() |
Return the total number of references in this segment.
|
ConcurrentReferenceHashMap.Reference<K,V> |
getReference(java.lang.Object key,
int hash,
ConcurrentReferenceHashMap.Restructure restructure) |
|
int |
getSize() |
Return the size of the current references array.
|
protected void |
restructureIfNecessary(boolean allowResize) |
Restructure the underlying data structure when it becomes necessary.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlockpublic ConcurrentReferenceHashMap.Reference<K,V> getReference(java.lang.Object key, int hash, ConcurrentReferenceHashMap.Restructure restructure)
public <T> T doTask(int hash,
java.lang.Object key,
com.aspectran.core.util.ConcurrentReferenceHashMap.Task<T> task)
T - the type of the results of the taskhash - the hash of the keykey - the keytask - the update operationpublic void clear()
protected final void restructureIfNecessary(boolean allowResize)
allowResize - if resizing is permittedpublic final int getSize()
public final int getCount()
Copyright © 2008–2018 The Aspectran Project. All rights reserved.