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 Object

AtomicReferenceFieldUpdater.

Version:
$Revision: 200 $
Author:
Adrian Brock

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(Class<U> tClass, Class<W> vClass, 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(Class<U> tClass,
                                                                Class<W> vClass,
                                                                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)


Copyright © 2005-2007 JBoss, a division of Red Hat, Inc. All Rights Reserved.