パッケージ org.springframework.util
クラス ConcurrentReferenceHashMap.Segment
java.lang.ObjectSE
java.util.concurrent.locks.ReentrantLockSE
org.springframework.util.ConcurrentReferenceHashMap.Segment
- 実装されたすべてのインターフェース:
SerializableSE
,LockSE
- 含まれているクラス:
- ConcurrentReferenceHashMap<K,
V>
同時パフォーマンスを向上させるためにマップを分割するために使用される単一のセグメント。
- 関連事項:
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
clear()
このセグメントからすべてのアイテムをクリアします。<T> T
doTask
(int hash, ObjectSE key, ConcurrentReferenceHashMap<K, V>.org.springframework.util.ConcurrentReferenceHashMap.Task<T> task) このセグメントに更新操作を適用します。int
getCount()
このセグメントの参照の総数を返します。getReference
(ObjectSE key, int hash, ConcurrentReferenceHashMap.Restructure restructure) int
getSize()
現在の参照配列のサイズを返します。クラス java.util.concurrent.locks.ReentrantLockSE から継承されたメソッド
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreadsSE, getWaitQueueLengthSE, hasQueuedThreadSE, hasQueuedThreads, hasWaitersSE, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLockSE, unlock
コンストラクターの詳細
Segment
public Segment(int initialSize, int resizeThreshold)
メソッドの詳細
getReference
@Nullable public ConcurrentReferenceHashMap.Reference<K,V> getReference(@Nullable ObjectSE key, int hash, ConcurrentReferenceHashMap.Restructure restructure) doTask
@Nullable public <T> T doTask(int hash, @Nullable ObjectSE key, ConcurrentReferenceHashMap<K, V>.org.springframework.util.ConcurrentReferenceHashMap.Task<T> task) このセグメントに更新操作を適用します。セグメントは更新中にロックされます。- パラメーター:
hash
- キーのハッシュkey
- キーtask
- 更新操作- 戻り値:
- 操作の結果
clear
public void clear()このセグメントからすべてのアイテムをクリアします。getSize
public int getSize()現在の参照配列のサイズを返します。getCount
public int getCount()このセグメントの参照の総数を返します。