当前位置:网站首页>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
边栏推荐
- RAC environment error reporting ora-00239: timeout waiting for control file enqueue troubleshooting
- Solution: you have 18 unapplied migration (s) Your project may not work properly until you apply
- [code analysis (4)] communication efficient learning of deep networks from decentralized data
- Oracle database recovery data
- 大专的我,闭关苦学 56 天,含泪拿下阿里 offer,五轮面试,六个小时灵魂拷问
- Oracle modify default temporary tablespace
- Modify the Jupiter notebook style
- Android interview theme collection
- Dynamic subset division problem
- Analysis of unused index columns caused by implicit conversion of timestamp
猜你喜欢
try --finally
crontab定时任务输出产生大量邮件耗尽文件系统inode问题处理
Oracle defines self incrementing primary keys through triggers and sequences, and sets a scheduled task to insert a piece of data into the target table every second
Oracle job scheduled task usage details
SSM project deployed in Alibaba cloud
2022年江西最新建筑八大员(质量员)模拟考试题库及答案解析
淘宝发布宝贝提示“您的消保保证金额度不足,已启动到期保障”
Small case of web login (including verification code login)
freeCodeCamp----time_ Calculator exercise
聯想拯救者Y9000X 2020
随机推荐
Technologie zéro copie
[code analysis (2)] communication efficient learning of deep networks from decentralized data
Processing of ASM network not automatically started in 19C
Oracle kills the executing SQL
Decentralized Collaborative Learning Framework for Next POI Recommendation
Special window function rank, deny_ rank, row_ number
自动化的艺术
函数只执行第一次的执行一次 once函数
Opening: identification of double pointer instrument panel
解决方案架构师的小锦囊 - 架构图的 5 种类型
Postman reference summary
Small case of web login (including verification code login)
Django::Did you install mysqlclient?
elmo(BiLSTM-CRF+elmo)(Conll-2003 命名实体识别NER)
蓝绿发布、滚动发布、灰度发布,有什么区别?
服务器中挖矿病毒了,屮
pycharm Install packages failed
Reading notes: Secure federated matrix factorization
MySQL index [data structure + index creation principle]
Scientists say Australian plan to cull up to 10,000 wild horses doesn’t go far enough