Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


AtomicIntegerFieldUpdater<T>java.util.concurrent.atomic

Java 5.0

This class uses
java.lang.reflect to provide atomic operations for
named volatile int fields within existing types.
Obtain an instance of this class with the newUpdater(
) factory method. Pass the name of the field (which must
have been declared volatile int) to be updated and
the class that it is defined within to this factory method. The
instance methods of the resulting
AtomicIntegerFieldUpdater object are like those of
the AtomicInteger class but require you to specify
the object whose field is to be manipulated. This is a generic type,
and the type variable T represents the
type whose volatile int field is being updated.

public abstract class

AtomicIntegerFieldUpdater<T> {
// Protected Constructors
protected

AtomicIntegerFieldUpdater ( );
// Public Class Methods
public static <U> AtomicIntegerFieldUpdater<U>

newUpdater (Class<U>

tclass ,
String

fieldName );
// Public Instance Methods
public int

addAndGet (T

obj , int

delta );
public abstract boolean

compareAndSet (T

obj , int

expect , int

update );
public int

decrementAndGet (T

obj );
public abstract int

get (T

obj );
public int

getAndAdd (T

obj , int

delta );
public int

getAndDecrement (T

obj );
public int

getAndIncrement (T

obj );
public int

getAndSet (T

obj , int

newValue );
public int

incrementAndGet (T

obj );
public abstract void

set (T

obj , int

newValue );
public abstract boolean

weakCompareAndSet (T

obj , int

expect , int

update );
}



    / 1191