当前位置:网站首页>AtomicIntegerArray源码分析与感悟
AtomicIntegerArray源码分析与感悟
2022-04-23 13:53: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《一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》无偿开源 威信搜索公众号【编程进阶路】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://xie.infoq.cn/article/536f8f5d3f27d1a33d9b96273
边栏推荐
- Three characteristics of volatile keyword [data visibility, prohibition of instruction rearrangement and no guarantee of operation atomicity]
- Oracle modify default temporary tablespace
- Detailed explanation of Oracle tablespace table partition and query method of Oracle table partition
- Reading notes: meta matrix factorization for federated rating predictions
- cnpm的诡异bug
- Static interface method calls are not supported at language level '5'
- JMeter pressure test tool
- Information: 2021 / 9 / 29 10:01 - build completed with 1 error and 0 warnings in 11S 30ms error exception handling
- PG library to view the distribution keys of a table in a certain mode
- Solution of discarding evaluate function in surprise Library
猜你喜欢

Port occupied 1

Reading notes: meta matrix factorization for federated rating predictions

Express②(路由)

【报名】TF54:工程师成长地图与卓越研发组织打造

Detailed explanation of redis (Basic + data type + transaction + persistence + publish and subscribe + master-slave replication + sentinel + cache penetration, breakdown and avalanche)

Apache seatunnel 2.1.0 deployment and stepping on the pit

低频量化之明日涨停预测

Modify the Jupiter notebook style

Kettle--控件解析
![Three characteristics of volatile keyword [data visibility, prohibition of instruction rearrangement and no guarantee of operation atomicity]](/img/ec/b1e99e0f6e7d1ef1ce70eb92ba52c6.png)
Three characteristics of volatile keyword [data visibility, prohibition of instruction rearrangement and no guarantee of operation atomicity]
随机推荐
SQL learning | set operation
服务器中挖矿病毒了,屮
美联储数字货币最新进展
Personal learning related
The query did not generate a result set exception resolution when the dolphin scheduler schedules the SQL task to create a table
Oracle database recovery data
L2-024 部落 (25 分)
Question bank and answer analysis of the 2022 simulated examination of the latest eight members of Jiangxi construction (quality control)
Django::Did you install mysqlclient?
Oracle lock table query and unlocking method
剑南春把文字游戏玩明白了
项目中遇到的问题(五)操作Excel接口Poi的理解
Dynamic subset division problem
Get the attribute value difference between two different objects with reflection and annotation
About me
Leetcode brush question 𞓜 13 Roman numeral to integer
Jenkins construction and use
Express ② (routing)
[VMware] address of VMware Tools
Tensorflow & pytorch common error reporting