API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent.atomic. AtomicLong View Source
Author(s)
Doug Lea
Since
1.5
Version
Serial
Hierarchy
 Object
      Number
          AtomicLong
Implements
 Serializable
Subclasses
Description
public class AtomicLong
  A long value that may be updated atomically.
See also:   
Constructors
public AtomicLong ()
Creates a new AtomicLong with initial value 0.
public AtomicLong (long initialValue)
  Creates a new AtomicLong with the given initial value.
Methods
Hide/Show inherited methods
publicfinal long addAndGet (long delta)
  Atomically adds the given value to the current value.
public byte byteValue () [Inherited From Number]
  Returns the value of the specified number as a byte.
publicfinal boolean compareAndSet (long expect, long update)
  Atomically sets the value to the given updated value if the current value == the expected value.
publicfinal long decrementAndGet ()
  Atomically decrements by one the current value.
public double doubleValue () [Specified in Number]
public float floatValue () [Specified in Number]
publicfinal long get ()
  Gets the current value.
publicfinal long getAndAdd (long delta)
  Atomically adds the given value to the current value.
publicfinal long getAndDecrement ()
  Atomically decrements by one the current value.
publicfinal long getAndIncrement ()
  Atomically increments by one the current value.
publicfinal long getAndSet (long newValue)
  Atomically sets to the given value and returns the old value.
publicfinal long incrementAndGet ()
  Atomically increments by one the current value.
public int intValue () [Specified in Number]
publicfinal void lazySet (long newValue)
  Eventually sets to the given value.
public long longValue () [Specified in Number]
publicfinal void set (long newValue)
  Sets to the given value.
public short shortValue () [Inherited From Number]
  Returns the value of the specified number as a short.
public String toString ()
  Returns the String representation of the current value.
publicfinal boolean weakCompareAndSet (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
pack-privatefinalstatic boolean VM_SUPPORTS_LONG_CAS
  Records whether the underlying JVM supports lockless CompareAndSet for longs.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar