protected final class ConcurrentReferenceHashMap.Segment
extends java.util.concurrent.locks.ReentrantLock
| 构造器和说明 |
|---|
Segment(int initialCapacity) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Clear all items from this segment.
|
<T> T |
doTask(int hash,
java.lang.Object key,
cn.jants.restful.bind.ConcurrentReferenceHashMap.Task<T> task)
Apply an update operation to this segment.
|
int |
getCount() |
ConcurrentReferenceHashMap.Reference<K,V> |
getReference(java.lang.Object key,
int hash,
ConcurrentReferenceHashMap.Restructure restructure) |
int |
getSize() |
protected void |
restructureIfNecessary(boolean allowResize)
Restructure the underlying data structure when it becomes necessary.
|
getHoldCount, 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,
cn.jants.restful.bind.ConcurrentReferenceHashMap.Task<T> task)
hash - 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 © 2018. All Rights Reserved.