API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent.atomic. AtomicStampedReference View Source
Author(s)
Doug Lea
Since
1.5
Version
Serial
Hierarchy
 Object
      AtomicStampedReference
Implements
Subclasses
Description
public class AtomicStampedReference
  An AtomicStampedReference maintains an object reference along with an integer "stamp", that can be updated atomically.
See also:   
Constructors
public AtomicStampedReference ( V initialRef, int initialStamp)
  Creates a new AtomicStampedReference with the given initial values.
Methods
Hide/Show inherited methods
public boolean attemptStamp ( V expectedReference, int newStamp)
  Atomically sets the value of the stamp to the given update value if the current reference is == to the expected reference.
public boolean compareAndSet ( V expectedReference, V newReference, int expectedStamp, int newStamp)
  Atomically sets the value of both the reference and stamp to the given update values if the current reference is == to the expected reference and the current stamp is equal to the expected stamp.
public V get (int[] stampHolder)
  Returns the current values of both the reference and the stamp.
public V getReference ()
  Returns the current value of the reference.
public int getStamp ()
  Returns the current value of the stamp.
public void set ( V newReference, int newStamp)
  Unconditionally sets the value of both the reference and stamp.
public boolean weakCompareAndSet ( V expectedReference, V newReference, int expectedStamp, int newStamp)
  Atomically sets the value of both the reference and stamp to the given update values if the current reference is == to the expected reference and the current stamp is equal to the expected stamp.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar