protected final class ConcurrentReferenceHashMap.Segment extends ReentrantLock
Constructor and Description |
---|
Segment(int initialSize,
int resizeThreshold) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all items from this segment.
|
<T> T |
doTask(int hash,
Object key,
org.apache.avro.util.springframework.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(Object key,
int hash,
ConcurrentReferenceHashMap.Restructure restructure) |
int |
getSize()
Return the size of the current references array.
|
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlock
@Nullable public ConcurrentReferenceHashMap.Reference<K,V> getReference(@Nullable Object key, int hash, ConcurrentReferenceHashMap.Restructure restructure)
@Nullable public <T> T doTask(int hash, @Nullable Object key, org.apache.avro.util.springframework.ConcurrentReferenceHashMap.Task<T> task)
hash
- the hash of the keykey
- the keytask
- the update operationpublic void clear()
public int getSize()
public int getCount()
Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.