パッケージ org.springframework.util

クラス ConcurrentReferenceHashMap.Segment

java.lang.ObjectSE
java.util.concurrent.locks.ReentrantLockSE
org.springframework.util.ConcurrentReferenceHashMap.Segment
実装されたすべてのインターフェース:
SerializableSELockSE
含まれているクラス:
ConcurrentReferenceHashMap<K,V>

protected final class ConcurrentReferenceHashMap.Segment extends ReentrantLockSE
同時パフォーマンスを向上させるためにマップを分割するために使用される単一のセグメント。
関連事項:
  • コンストラクターの詳細

    • Segment

      public Segment(int initialSize, int resizeThreshold)
  • メソッドの詳細

    • getReference

    • 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()
      このセグメントの参照の総数を返します。