当前位置:网站首页>Analysis and understanding of atomicintegerarray source code
Analysis and understanding of atomicintegerarray source code
2022-04-23 13:56:00 【InfoQ】
- Expert Group and released to the public domain, as explained at
- http://creativecommons.org/publicdomain/zero/1.0/
- An {@code int} array in which elements may be updated atomically.
- See the {@link java.util.concurrent.atomic} package
- specification for description of the properties of atomic
- variables.
- @since 1.5
- @author Doug Lea
- Creates a new AtomicIntegerArray of the given length, with all
- elements initially zero.
- @param length the length of the array
- Creates a new AtomicIntegerArray with the same length as, and
- all elements copied from, the given array.
- @param array the array to copy elements from
- @throws NullPointerException if array is null
- Returns the length of the array.
- @return the length of the array
- Gets the current value at position {@code i}.
- @param i the index
- @return the current value
- Sets the element at position {@code i} to the given value.
- @param i the index
- @param newValue the new value
- Eventually sets the element at position {@code i} to the given value.
- @param i the index
- @param newValue the new value
- @since 1.6
- Atomically sets the element at position {@code i} to the given
- value and returns the old value.
- @param i the index
- @param newValue the new value
- @return the previous value
- Atomically sets the element at position {@code i} to the given
- updated value if the current value {@code ==} the expected value.
- @param i the index
- @param expect the expected value
- @param update the new value
- @return true if successful. False return indicates that
- the actual value was not equ《 A big factory Java Analysis of interview questions + Back end development learning notes + The latest architecture explanation video + Practical project source code handout 》 Free open source Prestige search official account 【 Advanced programming 】al to the expected value.
- Atomically sets the element at position {@code i} to the given
- updated value if the current value {@code ==} the expected value.
- <p>May <a href="package-summary.html#Spurious">fail spuriously</a>
- and does not provide ordering guarantees, so is only rarely an
- appropriate alternative to {@code compareAndSet}.
- @param i the index
- @param expect the expected value
- @param update the new value
- @return true if successful.
- Atomically increments by one the element at index {@code i}.
- @param i the index
- @return the previous value
- Atomically decrements by one the element at index {@code i}.
- @param i the index
- @return the previous value
- Atomically adds the given value to the element at index {@code i}.
- @param i the index
- @param delta the value to add
- @return the previous value
- Atomically increments by one the element at index {@code i}.
- @param i the index
版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231353209864.html
边栏推荐
- Android interview theme collection
- Express ② (routage)
- Influence of openssh version on SSH mutual trust creation in RAC environment
- Jiannanchun understood the word game
- Es introduction learning notes
- About note 1
- Oracle modify default temporary tablespace
- Wechat applet
- Analysis of the problem that the cluster component GIPC in RAC environment cannot correctly identify the heartbeat network state
- Small case of web login (including verification code login)
猜你喜欢
Express ② (routing)
PG SQL intercepts the string to the specified character position
Question bank and answer analysis of the 2022 simulated examination of the latest eight members of Jiangxi construction (quality control)
Jenkins construction and use
Dynamic subset division problem
零拷貝技術
2022年江西最新建筑八大员(质量员)模拟考试题库及答案解析
Static interface method calls are not supported at language level '5'
淘宝发布宝贝提示“您的消保保证金额度不足,已启动到期保障”
Quartus Prime硬件实验开发(DE2-115板)实验二功能可调综合计时器设计
随机推荐
19c environment ora-01035 login error handling
[code analysis (2)] communication efficient learning of deep networks from decentralized data
Analysis of cluster component gpnp failed to start successfully in RAC environment
Oracle calculates the difference between two dates in seconds, minutes, hours and days
村上春树 --《当我谈跑步时,我谈些什么》句子摘录
FDFS start
Technologie zéro copie
JMeter pressure test tool
Basic SQL query and learning
Android 面试主题集合整理
【项目】小帽外卖(八)
leetcode--380.O(1) 时间插入、删除和获取随机元素
Using Jupiter notebook in virtual environment
Building MySQL environment under Ubuntu & getting to know SQL
MySQL [read / write lock + table lock + row lock + mvcc]
Function executes only the once function for the first time
[code analysis (7)] communication efficient learning of deep networks from decentralized data
33 million IOPs, 39 microsecond delay, carbon footprint certification, who is serious?
SSM project deployed in Alibaba cloud
大专的我,闭关苦学 56 天,含泪拿下阿里 offer,五轮面试,六个小时灵魂拷问