API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent.atomic. AtomicLongArray View Source
Author(s)
Doug Lea
Since
1.5
Version
Serial
Hierarchy
 Object
      AtomicLongArray
Implements
 Serializable
Subclasses
Description
public class AtomicLongArray
  A long array in which elements may be updated atomically.
See also:   
Constructors
public AtomicLongArray (int length)
  Creates a new AtomicLongArray of given length.
public AtomicLongArray (long[] array)
  Creates a new AtomicLongArray with the same length as, and all elements copied from, the given array.
Methods
Hide/Show inherited methods
public long addAndGet (int i, long delta)
  Atomically adds the given value to the element at index i.
publicfinal boolean compareAndSet (int i, long expect, long update)
  Atomically sets the value to the given updated value if the current value == the expected value.
publicfinal long decrementAndGet (int i)
  Atomically decrements by one the element at index i.
publicfinal long get (int i)
  Gets the current value at position i.
publicfinal long getAndAdd (int i, long delta)
  Atomically adds the given value to the element at index i.
publicfinal long getAndDecrement (int i)
  Atomically decrements by one the element at index i.
publicfinal long getAndIncrement (int i)
  Atomically increments by one the element at index i.
publicfinal long getAndSet (int i, long newValue)
  Atomically sets the element at position i to the given value and returns the old value.
publicfinal long incrementAndGet (int i)
  Atomically increments by one the element at index i.
publicfinal void lazySet (int i, long newValue)
  Eventually sets the element at position i to the given value.
publicfinal int length ()
  Returns the length of the array.
publicfinal void set (int i, long newValue)
  Sets the element at position i to the given value.
public String toString ()
  Returns the String representation of the current values of array.
publicfinal boolean weakCompareAndSet (int i, long expect, long update)
  Atomically sets the value to the given updated value if the current value == the expected value.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar