jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongArray.java
changeset 11134 9ff7640994bf
parent 9242 ef138d47df58
child 15020 50394fa17c1b
equal deleted inserted replaced
11133:e05aee7c8611 11134:9ff7640994bf
    33  * http://creativecommons.org/publicdomain/zero/1.0/
    33  * http://creativecommons.org/publicdomain/zero/1.0/
    34  */
    34  */
    35 
    35 
    36 package java.util.concurrent.atomic;
    36 package java.util.concurrent.atomic;
    37 import sun.misc.Unsafe;
    37 import sun.misc.Unsafe;
    38 import java.util.*;
       
    39 
    38 
    40 /**
    39 /**
    41  * A {@code long} array in which elements may be updated atomically.
    40  * A {@code long} array in which elements may be updated atomically.
    42  * See the {@link java.util.concurrent.atomic} package specification
    41  * See the {@link java.util.concurrent.atomic} package specification
    43  * for description of the properties of atomic variables.
    42  * for description of the properties of atomic variables.
   134      */
   133      */
   135     public final void lazySet(int i, long newValue) {
   134     public final void lazySet(int i, long newValue) {
   136         unsafe.putOrderedLong(array, checkedByteOffset(i), newValue);
   135         unsafe.putOrderedLong(array, checkedByteOffset(i), newValue);
   137     }
   136     }
   138 
   137 
   139 
       
   140     /**
   138     /**
   141      * Atomically sets the element at position {@code i} to the given value
   139      * Atomically sets the element at position {@code i} to the given value
   142      * and returns the old value.
   140      * and returns the old value.
   143      *
   141      *
   144      * @param i the index
   142      * @param i the index