类 ConcurrentReferenceHashMap.Segment

    • 构造器详细资料

      • Segment

        public Segment​(int initialSize,
                       int resizeThreshold)
    • 方法详细资料

      • doTask

        @Nullable
        public <T> T doTask​(int hash,
                            @Nullable
                            @Nullable Object key,
                            cc.shacocloud.mirage.utils.map.ConcurrentReferenceHashMap.Task<T> task)
        将更新操作应用于此段。该段将在更新期间被锁定。
        参数:
        hash - 键的哈希值
        key - 键
        task - 更新操作
        返回:
        操作的结果
      • clear

        public void clear()
        清除此细分中的所有项目
      • getSize

        public int getSize()
        返回当前引用数组的大小。
      • getCount

        public int getCount()
        返回此段中的引用总数。