Example usage for java.util.concurrent.atomic AtomicLong lazySet

List of usage examples for java.util.concurrent.atomic AtomicLong lazySet

Introduction

In this page you can find the example usage for java.util.concurrent.atomic AtomicLong lazySet.

Prototype

public final void lazySet(long newValue) 

Source Link

Document

Sets the value to newValue , with memory effects as specified by VarHandle#setRelease .

Usage

From source file:Main.java

public static void main(String[] argv) {
    AtomicLong nextId = new AtomicLong();

    nextId.lazySet(12312L);

    System.out.println(nextId.getAndIncrement());
}