The classes of atomic operations in java1.8 are under Package java.util.concurrent.atomic, all of which include the following:
- Atomicboolean
- Atomicinteger
- Atomicintegerarray
- Atomicintegerfieldupdater
- Atomiclong
- Atomiclongarray
- Atomiclongfieldupdater
- Atomicmarkablereference
- Atomicreference
- Atomicreferencearray
- Atomicreferencefieldupdater
- Atomicstampedreference
- Doubleaccumulator
- Doubleadder
- Longaccumulator
- Longadder
java1.8 extends the atomic classes, which are some of them more efficient, new additions to the class as follows, which are mentioned in the following context:
- Doubleaccumulator
- Doubleadder
- Longaccumulator
- Longadder
Depending on the type of data being modified, the atomic manipulation classes in the Juc package can be divided into 4 classes.
1. Basic type : Atomicinteger, Atomiclong (Longadder), Doubleadder, Atomicboolean;
2. array type : Atomicintegerarray, Atomiclongarray, Atomicreferencearray;
3. reference type : Atomicreference, Atomicstampedrerence, atomicmarkablereference;
4. object's property modification type : Atomicintegerfieldupdater, Atomiclongfieldupdater, Atomicreferencefieldupdater.
These classes exist to perform atomic operations on the corresponding data. The so-called atomic operation means that the operation process is not interrupted, and that the data operation is carried out in an atomic manner.
Java Multithreading--Atomic class