org.jboss.util.concurrent.atomic
Class AtomicIntegerFieldUpdater<T>

java.lang.Object
  extended by org.jboss.util.concurrent.atomic.AtomicIntegerFieldUpdater<T>

public abstract class AtomicIntegerFieldUpdater<T>
extends Object

AtomicIntegerFieldUpdater.

Version:
$Revision: 200 $
Author:
Adrian Brock

Constructor Summary
protected AtomicIntegerFieldUpdater()
          Create a new AtomicIntegerFieldUpdater.
 
Method Summary
 int addAndGet(T obj, int delta)
           
abstract  boolean compareAndSet(T obj, int expect, int update)
           
 int decrementAndGet(T obj)
           
abstract  int get(T obj)
           
 int getAndAdd(T obj, int delta)
           
 int getAndDecrement(T obj)
           
 int getAndIncrement(T obj)
           
 int getAndSet(T obj, int newValue)
           
 int incrementAndGet(T obj)
           
static
<U> AtomicIntegerFieldUpdater<U>
newUpdater(Class<U> tClass, String fieldName)
           
abstract  void set(T obj, int newValue)
           
abstract  boolean weakCompareAndSet(T obj, int expect, int update)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomicIntegerFieldUpdater

protected AtomicIntegerFieldUpdater()
Create a new AtomicIntegerFieldUpdater.

Method Detail

newUpdater

public static <U> AtomicIntegerFieldUpdater<U> newUpdater(Class<U> tClass,
                                                          String fieldName)

addAndGet

public int addAndGet(T obj,
                     int delta)

compareAndSet

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

decrementAndGet

public int decrementAndGet(T obj)

get

public abstract int get(T obj)

getAndAdd

public int getAndAdd(T obj,
                     int delta)

getAndDecrement

public int getAndDecrement(T obj)

getAndIncrement

public int getAndIncrement(T obj)

getAndSet

public int getAndSet(T obj,
                     int newValue)

incrementAndGet

public int incrementAndGet(T obj)

set

public abstract void set(T obj,
                         int newValue)

weakCompareAndSet

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


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