![](/img/trans.png)
[英]Will ConcurrentHashMap with concurrencyLevel as 1 work as HashMap
[英]concurrencyLevel in ConcurrentHashMap
如果ConcurrentHashMap大小增加,concurrencyLevel会是什么?
假设ConcurrentHashMap的初始容量为16.而默认的concurrencyLevel为16.如果容量在一段时间后按负载因子增加,现在增加的容量为28.在这种情况下,concurrencyLevel是什么?
继续使用这些链接以及ConcurrentHashMap中的Segmentation和在ConcurrentHashMap中 修改值但仍然不清楚。
提前致谢。
没有理由在阅读文档时考虑并发级别可能会发生变化。 它仍然是在对象创建过程中设置的内容。 如有疑问,请浏览源代码:
如果初始容量低于指定的并发级别,它似乎只会增加容器的数量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.