AtomicReferenceArrayE


AtomicReferenceArray<E> java.util.concurrent.atomic

Java 5.0 serializable

This threadsafe class holds an array of elements of type E . It provides volatile access semantics for these array elements and defines atomic operations for manipulating them. Its methods are like those of AtomicReference with the addition of a parameter that specifies the array index of the desired element.

Figure 16-103. java.util.concurrent.atomic.AtomicReferenceArray<E>

 public class  AtomicReferenceArray<E>  implements Serializable {  // Public Constructors  public  AtomicReferenceArray  (E[ ]  array  );        public  AtomicReferenceArray  (int  length  );  // Public Instance Methods  public final boolean  compareAndSet  (int  i  , E  expect  , E  update  );        public final E  get  (int  i  );        public final E  getAndSet  (int  i  , E  newValue  );        public final int  length  ( );        public final void  set  (int  i  , E  newValue  );        public final boolean  weakCompareAndSet  (int  i  , E  expect  , E  update  );  // Public Methods Overriding Object  public String  toString  ( );   } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net