Java AtomicLong

Java AtomicLong is a class in Java's java.util.concurrent.atomic package that provides an atomic operation for updating a long value in a thread-safe manner. It offers methods like Java incrementAndGet(), Java addAndGet(), and Java compareAndSet() to modify the value atomically, ensuring that the operation is thread-safe without requiring explicit synchronization. Introduced in Java 2004 with Java 5, AtomicLong is often used for counters or other numeric values in concurrent applications.

https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html