org.jboss.util.concurrent.atomic
Class AtomicReferenceFieldUpdater<T,V>

java.lang.Object
  extended by org.jboss.util.concurrent.atomic.AtomicReferenceFieldUpdater<T,V>

public abstract class AtomicReferenceFieldUpdater<T,V>
extends java.lang.Object

AtomicReferenceFieldUpdater.


Constructor Summary
protected AtomicReferenceFieldUpdater()
          Create a new AtomicReferenceFieldUpdater.
 
Method Summary
abstract  boolean compareAndSet(T obj, V expect, V update)
           
abstract  V get(T obj)
           
 V getAndSet(T obj, V newValue)
           
static
<U,W> AtomicReferenceFieldUpdater<U,W>
newUpdater(java.lang.Class<U> tClass, java.lang.Class<W> vClass, java.lang.String fieldName)
           
abstract  void set(T obj, V newValue)
           
abstract  boolean weakCompareAndSet(T obj, V expect, V update)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomicReferenceFieldUpdater

protected AtomicReferenceFieldUpdater()
Create a new AtomicReferenceFieldUpdater.

Method Detail

newUpdater

public static <U,W> AtomicReferenceFieldUpdater<U,W> newUpdater(java.lang.Class<U> tClass,
                                                                java.lang.Class<W> vClass,
                                                                java.lang.String fieldName)

compareAndSet

public abstract boolean compareAndSet(T obj,
                                      V expect,
                                      V update)

get

public abstract V get(T obj)

getAndSet

public V getAndSet(T obj,
                   V newValue)

set

public abstract void set(T obj,
                         V newValue)

weakCompareAndSet

public abstract boolean weakCompareAndSet(T obj,
                                          V expect,
                                          V update)