Example usage for Java java.util.concurrent.atomic AtomicLongArray fields, constructors, methods, implement or subclass
The text is from its open source code.
AtomicLongArray(int length) Creates a new AtomicLongArray of the given length, with all elements initially zero. | |
AtomicLongArray(long[] array) Creates a new AtomicLongArray with the same length as, and all elements copied from, the given array. |
long | addAndGet(int i, long delta) Atomically adds the given value to the element at index i , with memory effects as specified by VarHandle#getAndAdd . |
boolean | compareAndSet(int i, long expectedValue, long newValue) Atomically sets the element at index i to newValue if the element's current value == expectedValue , with memory effects as specified by VarHandle#compareAndSet . |
long | decrementAndGet(int i) Atomically decrements the value of the element at index i , with memory effects as specified by VarHandle#getAndAdd . |
long | get(int i) Returns the current value of the element at index i , with memory effects as specified by VarHandle#getVolatile . |
long | getAndAdd(int i, long delta) Atomically adds the given value to the element at index i , with memory effects as specified by VarHandle#getAndAdd . |
long | getAndDecrement(int i) Atomically decrements the value of the element at index i , with memory effects as specified by VarHandle#getAndAdd . |
long | getAndIncrement(int i) Atomically increments the value of the element at index i , with memory effects as specified by VarHandle#getAndAdd . |
long | getAndSet(int i, long newValue) Atomically sets the element at index i to newValue and returns the old value, with memory effects as specified by VarHandle#getAndSet . |
long | incrementAndGet(int i) Atomically increments the value of the element at index i , with memory effects as specified by VarHandle#getAndAdd . |
void | lazySet(int i, long newValue) Sets the element at index i to newValue , with memory effects as specified by VarHandle#setRelease . |
int | length() Returns the length of the array. |
void | set(int i, long newValue) Sets the element at index i to newValue , with memory effects as specified by VarHandle#setVolatile . |
String | toString() Returns the String representation of the current values of array. |
boolean | weakCompareAndSet(int i, long expectedValue, long newValue) Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue , with memory effects as specified by VarHandle#weakCompareAndSetPlain . |