久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

ConcurrentHashMap 中的分割

Segmentation in ConcurrentHashMap(ConcurrentHashMap 中的分割)
本文介紹了ConcurrentHashMap 中的分割的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我是 Java 世界的新手,我在探索 ConcurrentHashMap API 時發現了這一點:

I am a newbie to the world of Java and I was exploring the ConcurrentHashMap API in which I discovered this:

static final int DEFAULT_INITIAL_CAPACITY = 16;
  static final float DEFAULT_LOAD_FACTOR = 0.75F;
  static final int DEFAULT_CONCURRENCY_LEVEL = 16;
  static final int MAXIMUM_CAPACITY = 1073741824;
  static final int MAX_SEGMENTS = 65536;
  static final int RETRIES_BEFORE_LOCK = 2;
  final Segment<K, V>[] segments;
final Segment<K, V> segmentFor(int paramInt)
  {
    return this.segments[(paramInt >>> this.segmentShift & this.segmentMask)];
  }

ConcurrentHashMap 中分割的基本原理是什么,為什么要使用它?請就細分概念提供更多建議.

What are the fundamentals of segmentation in ConcurrentHashMap and why it is used? Please advise more on the segmentation concept.

推薦答案

并發散列映射將其內容劃分為段,以減少寫鎖爭用.

The concurrent hash map divides its contents into segments, to reduce writer lock contention.

concurrencyLevel 參數定義段數.默認為 16.

The concurrencyLevel parameter defines the number of segments. It's 16 by default.

這篇關于ConcurrentHashMap 中的分割的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Convert List of Strings into Map using Java-8 Streams API(使用 Java-8 Streams API 將字符串列表轉換為 Map)
Getting data from JSON(從 JSON 獲取數據)
java linkedhashmap iteration(javalinkedhashmap迭代)
Converting a list of objects to Map(將對象列表轉換為 Map)
Create a HashMap with a fixed Key corresponding to a HashSet. point of departure(用一個固定的Key對應一個HashSet創建一個HashMap.出發點)
HttpMessageConverter exception : RestClientException: Could not write request: no suitable HttpMessageConverter found(HttpMessageConverter 異常:RestClientException:無法寫入請求:找不到合適的 HttpMessageConverter) - IT屋-程序員
主站蜘蛛池模板: 久久婷婷国产香蕉 | 操到爽 | 婷婷丁香在线视频 | 天天操夜夜拍 | 狠狠婷婷综合久久久久久妖精 | 欧美成人一区二区三区片免费 | 精品国产欧美日韩不卡在线观看 | 成人免费av | 久久www免费视频 | 亚洲人成网亚洲欧洲无码 | 欧美日韩午夜精品 | 日本成人在线观看网站 | 日韩在线视频一区 | 91观看| 欧美精品一区二区三区四区 | 日韩三级在线 | 亚洲国产第一页 | a在线观看 | 天天影视亚洲综合网 | jizz视频 | 精品一二区 | 欧美一级片在线 | 一区天堂 | 在线亚洲免费视频 | 99精品一区二区三区 | 亚洲国产成人精品久久久国产成人一区 | 91啪亚洲精品 | av大片| 一级特黄a大片 | 亚洲vs天堂 | 国产精品毛片无码 | 黄色网址大全在线观看 | 一区二区三区免费 | 久久免费精品视频 | 亚洲精品视 | 91麻豆产精品久久久久久夏晴子 | 日韩精品一区二区三区视频播放 | 免费在线观看一区二区 | 日韩av一区在线观看 | av在线免费观看网址 | 日韩欧美一区二区三区免费观看 |