c

java.util.concurrent.atomic

AtomicLongArray

class AtomicLongArray extends Serializable

Annotations
@SerialVersionUID()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AtomicLongArray
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new AtomicLongArray(array: Array[Long])

    Creates a new AtomicIntegerArray with the same length as, and all elements copied from, the given array.

    Creates a new AtomicIntegerArray with the same length as, and all elements copied from, the given array.

    array

    the array to copy elements from

    Exceptions thrown

    java.lang.NullPointerException if array is null

  2. new AtomicLongArray(length: Int)

    Creates a new AtomicIntegerArray of the given length, with all elements initially zero.

    Creates a new AtomicIntegerArray of the given length, with all elements initially zero.

    length

    the length of the array

  3. new AtomicLongArray()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def accumulateAndGet(i: Int, x: Long, accumulatorFunction: LongBinaryOperator): Long

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the element at index i with the results of applying the given function to the current and given values, returning the updated value.

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the element at index i with the results of applying the given function to the current and given values, returning the updated value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads. The function is applied with the current value of the element at index i as its first argument, and the given update as the second argument.

    i

    the index

    x

    the update value

    accumulatorFunction

    a side-effect-free function of two arguments

    returns

    the updated value

    Since

    1.8

  5. final def addAndGet(i: Int, delta: Long): Long

    Atomically adds the given value to the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Atomically adds the given value to the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    i

    the index

    delta

    the value to add

    returns

    the updated value

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. final def compareAndExchange(i: Int, expectedValue: Long, newValue: Long): Long

    Atomically sets the element at index i to newValue if the element's current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchange.

    Atomically sets the element at index i to newValue if the element's current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchange.

    i

    the index

    expectedValue

    the expected value

    newValue

    the new value

    returns

    the witness value, which will be the same as the expected value if successful

    Since

    9

  9. final def compareAndExchangeAcquire(i: Int, expectedValue: Long, newValue: Long): Long

    Atomically sets the element at index i to newValue if the element's current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchangeAcquire.

    Atomically sets the element at index i to newValue if the element's current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchangeAcquire.

    i

    the index

    expectedValue

    the expected value

    newValue

    the new value

    returns

    the witness value, which will be the same as the expected value if successful

    Since

    9

  10. final def compareAndExchangeRelease(i: Int, expectedValue: Long, newValue: Long): Long

    Atomically sets the element at index i to newValue if the element's current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchangeRelease.

    Atomically sets the element at index i to newValue if the element's current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchangeRelease.

    i

    the index

    expectedValue

    the expected value

    newValue

    the new value

    returns

    the witness value, which will be the same as the expected value if successful

    Since

    9

  11. final def compareAndSet(i: Int, expectedValue: Long, newValue: Long): Boolean

    Atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#compareAndSet.

    Atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#compareAndSet.

    i

    the index

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful. False return indicates that the actual value was not equal to the expected value.

  12. final def decrementAndGet(i: Int): Long

    Atomically decrements the value of the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Atomically decrements the value of the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Equivalent to addAndGet(i, -1).

    i

    the index

    returns

    the updated value

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  16. final def get(i: Int): Long

    Returns the current value of the element at index i, with memory effects as specified by VarHandle#getVolatile.

    Returns the current value of the element at index i, with memory effects as specified by VarHandle#getVolatile.

    i

    the index

    returns

    the current value

  17. final def getAcquire(i: Int): Long

    Returns the current value of the element at index i, with memory effects as specified by VarHandle#getAcquire.

    Returns the current value of the element at index i, with memory effects as specified by VarHandle#getAcquire.

    i

    the index

    returns

    the value

    Since

    9

  18. final def getAndAccumulate(i: Int, x: Long, accumulatorFunction: LongBinaryOperator): Long

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the element at index i with the results of applying the given function to the current and given values, returning the previous value.

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the element at index i with the results of applying the given function to the current and given values, returning the previous value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads. The function is applied with the current value of the element at index i as its first argument, and the given update as the second argument.

    i

    the index

    x

    the update value

    accumulatorFunction

    a side-effect-free function of two arguments

    returns

    the previous value

    Since

    1.8

  19. final def getAndAdd(i: Int, delta: Long): Long

    Atomically adds the given value to the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Atomically adds the given value to the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    i

    the index

    delta

    the value to add

    returns

    the previous value

  20. final def getAndDecrement(i: Int): Long

    Atomically decrements the value of the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Atomically decrements the value of the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Equivalent to getAndAdd(i, -1).

    i

    the index

    returns

    the previous value

  21. final def getAndIncrement()(i: Int): Long

    Atomically increments the value of the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Atomically increments the value of the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Equivalent to getAndAdd(i, 1).

    i

    the index

    returns

    the previous value

  22. final def getAndSet(i: Int, newValue: Long): Long

    Atomically sets the element at index i to newValue and returns the old value, with memory effects as specified by VarHandle#getAndSet.

    Atomically sets the element at index i to newValue and returns the old value, with memory effects as specified by VarHandle#getAndSet.

    i

    the index

    newValue

    the new value

    returns

    the previous value

  23. final def getAndUpdate(i: Int, updateFunction: LongUnaryOperator): Long

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the element at index i with the results of applying the given function, returning the previous value.

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the element at index i with the results of applying the given function, returning the previous value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads.

    i

    the index

    updateFunction

    a side-effect-free function

    returns

    the previous value

    Since

    1.8

  24. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. final def getOpaque(i: Int): Long

    Returns the current value of the element at index i, with memory effects as specified by VarHandle#getOpaque.

    Returns the current value of the element at index i, with memory effects as specified by VarHandle#getOpaque.

    i

    the index

    returns

    the value

    Since

    9

  26. final def getPlain(i: Int): Long

    Returns the current value of the element at index i, with memory semantics of reading as if the variable was declared non-volatile.

    Returns the current value of the element at index i, with memory semantics of reading as if the variable was declared non-volatile.

    i

    the index

    returns

    the value

    Since

    9

  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. final def incrementAndGet(i: Int): Long

    Atomically increments the value of the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Atomically increments the value of the element at index i, with memory effects as specified by VarHandle#getAndAdd.

    Equivalent to addAndGet(i, 1).

    i

    the index

    returns

    the updated value

  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. final def lazySet(i: Int, newValue: Long): Unit

    Sets the element at index i to newValue, with memory effects as specified by VarHandle#setRelease.

    Sets the element at index i to newValue, with memory effects as specified by VarHandle#setRelease.

    i

    the index

    newValue

    the new value

    Since

    1.6

  31. final def length(): Int

    Returns the length of the array.

    Returns the length of the array.

    returns

    the length of the array

  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. final def set(i: Int, newValue: Long): Unit

    Sets the element at index i to newValue, with memory effects as specified by VarHandle#setVolatile.

    Sets the element at index i to newValue, with memory effects as specified by VarHandle#setVolatile.

    i

    the index

    newValue

    the new value

  36. final def setOpaque(i: Int, newValue: Long): Unit

    Sets the element at index i to newValue, with memory effects as specified by VarHandle#setOpaque.

    Sets the element at index i to newValue, with memory effects as specified by VarHandle#setOpaque.

    i

    the index

    newValue

    the new value

    Since

    9

  37. final def setPlain(i: Int, newValue: Long): Unit

    Sets the element at index i to newValue, with memory semantics of setting as if the variable was declared non-volatile and non-final.

    Sets the element at index i to newValue, with memory semantics of setting as if the variable was declared non-volatile and non-final.

    i

    the index

    newValue

    the new value

    Since

    9

  38. final def setRelease(i: Int, newValue: Long): Unit

    Sets the element at index i to newValue, with memory effects as specified by VarHandle#setRelease.

    Sets the element at index i to newValue, with memory effects as specified by VarHandle#setRelease.

    i

    the index

    newValue

    the new value

    Since

    9

  39. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  40. def toString(): String

    Returns the String representation of the current values of array.

    Returns the String representation of the current values of array.

    returns

    the String representation of the current values of array

    Definition Classes
    AtomicLongArray → AnyRef → Any
  41. final def updateAndGet(i: Int, updateFunction: LongUnaryOperator): Long

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the element at index i with the results of applying the given function, returning the updated value.

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the element at index i with the results of applying the given function, returning the updated value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads.

    i

    the index

    updateFunction

    a side-effect-free function

    returns

    the updated value

    Since

    1.8

  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  45. final def weakCompareAndSetAcquire(i: Int, expectedValue: Long, newValue: Long): Boolean

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetAcquire.

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetAcquire.

    i

    the index

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Since

    9

  46. final def weakCompareAndSetPlain(i: Int, expectedValue: Long, newValue: Long): Boolean

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetPlain.

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetPlain.

    i

    the index

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Since

    9

  47. final def weakCompareAndSetRelease(i: Int, expectedValue: Long, newValue: Long): Boolean

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetRelease.

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetRelease.

    i

    the index

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Since

    9

  48. final def weakCompareAndSetVolatile(i: Int, expectedValue: Long, newValue: Long): Boolean

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSet.

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSet.

    i

    the index

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Since

    9

Deprecated Value Members

  1. final def weakCompareAndSet(i: Int, expectedValue: Long, newValue: Long): Boolean

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetPlain.

    Possibly atomically sets the element at index i to newValue if the element's current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetPlain.

    i

    the index

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Annotations
    @deprecated
    Deprecated

    (Since version 9)

    See also

    #weakCompareAndSetPlain

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped