当前位置:网站首页>Atomic atomic operation
Atomic atomic operation
2022-07-03 12:13:00 【zwanying】
Atomic Atomic manipulation
AtomicIntegerArray Basic operation
Same as AtomicInteger similar , Only the parameters are increased int i , Indicates that the index of the array is i Position value or assignment of .
import java.util.concurrent.atomic.AtomicIntegerArray;
import static org.junit.Assert.assertEquals;
class Test {
public static void main(String args[]) throws InterruptedException {
AtomicIntegerArray array = new AtomicIntegerArray(10);
// assignment
array.set(0,4);
array.set(5,7);
// Value
assertEquals(array.get(0),4);
assertEquals(array.get(5),7);
}
}
AtomicIntegerFieldUpdater
AtomicReferenceFieldUpdater<T,V>
Perform atomic operations on class member variables .
AtomicMarkableReference
<Object,boolean> Mark Atomic manipulation
AtomicStampedReference
<Object,int> Counting atomic operations
边栏推荐
- OpenGL 着色器使用
- Solution à la défaillance de l'installation d'Electron
- How to deploy web pages to Alibaba cloud
- (database authorization - redis) summary of unauthorized access vulnerabilities in redis
- Integer string int mutual conversion
- Talk about the state management mechanism in Flink framework
- OpenGL draws colored triangles
- 4000 word super detailed pointer
- Solve msvcp120d DLL and msvcr120d DLL missing
- 232. Implement queue with stack
猜你喜欢
随机推荐
Sheet1$. Output [excel source output] Error in column [xxx]. The returned column status is: "the text is truncated, or one or more characters have no matches in the target code page.".
Colleagues wrote a responsibility chain model, with countless bugs
OpenGL index cache object EBO and lineweight mode
Talk about the state management mechanism in Flink framework
Dynamically monitor disk i/o with ZABBIX
ES6新特性
Raven2 of vulnhub
PHP导出word方法(一phpword)
OPenGL 基本知识(根据自己理解整理)
Fluent: Engine Architecture
Unity3d learning notes 5 - create sub mesh
vulnhub之Ripper
How to convert a numeric string to an integer
PHP导出word方法(一mht)
STL tutorial 8-map
Apprendre à concevoir des entités logicielles réutilisables à partir de la classe, de l'API et du cadre
(construction notes) ADT and OOP
PHP export word method (one MHT)
OpenGL 着色器使用
CGroup introduction