class AtomicLong extends Number with Serializable

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

Instance Constructors

  1. new AtomicLong()
  2. new AtomicLong(value: Long)

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(x: Long, accumulatorFunction: LongBinaryOperator): Long

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the current value 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 current value 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 as its first argument, and the given update as the second argument.

    x

    the update value

    accumulatorFunction

    a side-effect-free function of two arguments

    returns

    the updated value

    Since

    1.8

  5. final def addAndGet(delta: Long): Long

    Atomically adds the given value to the current value, with memory effects as specified by VarHandle#getAndAdd.

    Atomically adds the given value to the current value, with memory effects as specified by VarHandle#getAndAdd.

    delta

    the value to add

    returns

    the updated value

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

    Atomically sets the value to newValue if the current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchange.

    Atomically sets the value to newValue if the current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchange.

    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 compareAndExchangeAcquire(expectedValue: Long, newValue: Long): Long

    Atomically sets the value to newValue if the current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchangeAcquire.

    Atomically sets the value to newValue if the current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchangeAcquire.

    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 compareAndExchangeRelease(expectedValue: Long, newValue: Long): Long

    Atomically sets the value to newValue if the current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchangeRelease.

    Atomically sets the value to newValue if the current value, referred to as the witness value, == expectedValue, with memory effects as specified by VarHandle#compareAndExchangeRelease.

    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

  12. final def compareAndSet(expectedValue: Long, newValue: Long): Boolean

    Atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#compareAndSet.

    Atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#compareAndSet.

    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.

  13. final def decrementAndGet(): Long

    Atomically decrements the current value, with memory effects as specified by VarHandle#getAndAdd.

    Atomically decrements the current value, with memory effects as specified by VarHandle#getAndAdd.

    Equivalent to addAndGet(-1).

    returns

    the updated value

  14. def doubleValue(): Double

    Returns the current value of this AtomicInteger as a double after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile.

    Returns the current value of this AtomicInteger as a double after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile.

    Definition Classes
    AtomicLongNumber
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  18. def floatValue(): Float

    Returns the current value of this AtomicInteger as a float after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile.

    Returns the current value of this AtomicInteger as a float after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile.

    Definition Classes
    AtomicLongNumber
  19. final def get(): Long

    Returns the current value, with memory effects as specified by VarHandle#getVolatile.

    Returns the current value, with memory effects as specified by VarHandle#getVolatile.

    returns

    the current value

  20. final def getAcquire: Long

    Returns the current value, with memory effects as specified by VarHandle#getAcquire.

    Returns the current value, with memory effects as specified by VarHandle#getAcquire.

    returns

    the value

    Since

    9

  21. final def getAndAccumulate(x: Long, accumulatorFunction: LongBinaryOperator): Long

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the current value 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 current value 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 as its first argument, and the given update as the second argument.

    x

    the update value

    accumulatorFunction

    a side-effect-free function of two arguments

    returns

    the previous value

    Since

    1.8

  22. final def getAndAdd(delta: Long): Long

    Atomically adds the given value to the current value, with memory effects as specified by VarHandle#getAndAdd.

    Atomically adds the given value to the current value, with memory effects as specified by VarHandle#getAndAdd.

    delta

    the value to add

    returns

    the previous value

  23. final def getAndDecrement(): Long

    Atomically decrements the current value, with memory effects as specified by VarHandle#getAndAdd.

    Atomically decrements the current value, with memory effects as specified by VarHandle#getAndAdd.

    Equivalent to getAndAdd(-1).

    returns

    the previous value

  24. final def getAndIncrement(): Long

    Atomically increments the current value, with memory effects as specified by VarHandle#getAndAdd.

    Atomically increments the current value, with memory effects as specified by VarHandle#getAndAdd.

    Equivalent to getAndAdd(1).

    returns

    the previous value

  25. final def getAndSet(newValue: Long): Long

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

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

    newValue

    the new value

    returns

    the previous value

  26. final def getAndUpdate(updateFunction: LongUnaryOperator): Long

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

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the current value 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.

    updateFunction

    a side-effect-free function

    returns

    the previous value

    Since

    1.8

  27. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. final def getOpaque(): Long

    Returns the current value, with memory effects as specified by VarHandle#getOpaque.

    Returns the current value, with memory effects as specified by VarHandle#getOpaque.

    returns

    the value

    Since

    9

  29. final def getPlain(): Long

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

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

    returns

    the value

    Since

    9

  30. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  31. final def incrementAndGet(): Long

    Atomically increments the current value, with memory effects as specified by VarHandle#getAndAdd.

    Atomically increments the current value, with memory effects as specified by VarHandle#getAndAdd.

    Equivalent to addAndGet(1).

    returns

    the updated value

  32. def intValue(): Int

    Returns the current value of this AtomicInteger as an int, with memory effects as specified by VarHandle#getVolatile.

    Returns the current value of this AtomicInteger as an int, with memory effects as specified by VarHandle#getVolatile.

    Equivalent to ( ).

    Definition Classes
    AtomicLongNumber
  33. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  34. final def lazySet(newValue: Long): Unit

    Sets the value to newValue, with memory effects as specified by VarHandle#setRelease.

    Sets the value to newValue, with memory effects as specified by VarHandle#setRelease.

    newValue

    the new value

    Since

    1.6

  35. def longValue(): Long

    Returns the current value of this AtomicInteger as a long after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile.

    Returns the current value of this AtomicInteger as a long after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile.

    Definition Classes
    AtomicLongNumber
  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. final def set(newValue: Long): Unit

    Sets the value to newValue, with memory effects as specified by VarHandle#setVolatile.

    Sets the value to newValue, with memory effects as specified by VarHandle#setVolatile.

    newValue

    the new value

  40. final def setOpaque(newValue: Long): Unit

    Sets the value to newValue, with memory effects as specified by VarHandle#setOpaque.

    Sets the value to newValue, with memory effects as specified by VarHandle#setOpaque.

    newValue

    the new value

    Since

    9

  41. final def setPlain(newValue: Long): Unit

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

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

    newValue

    the new value

    Since

    9

  42. final def setRelease(newValue: Long): Unit

    Sets the value to newValue, with memory effects as specified by VarHandle#setRelease.

    Sets the value to newValue, with memory effects as specified by VarHandle#setRelease.

    newValue

    the new value

    Since

    9

  43. def shortValue(): Short
    Definition Classes
    Number
  44. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String

    Returns the String representation of the current value.

    Returns the String representation of the current value.

    returns

    the String representation of the current value

    Definition Classes
    AtomicLong → AnyRef → Any
  46. final def updateAndGet(updateFunction: LongUnaryOperator): Long

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

    Atomically updates (with memory effects as specified by VarHandle#compareAndSet) the current value 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.

    updateFunction

    a side-effect-free function

    returns

    the updated value

    Since

    1.8

  47. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  50. final def weakCompareAndSetAcquire(expectedValue: Long, newValue: Long): Boolean

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetAcquire.

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetAcquire.

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Since

    9

  51. final def weakCompareAndSetPlain(expectedValue: Long, newValue: Long): Boolean

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetPlain.

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetPlain.

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Since

    9

  52. final def weakCompareAndSetRelease(expectedValue: Long, newValue: Long): Boolean

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetRelease.

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetRelease.

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Since

    9

  53. final def weakCompareAndSetVolatile(expectedValue: Long, newValue: Long): Boolean

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSet.

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSet.

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Since

    9

Deprecated Value Members

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

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetPlain.

    Possibly atomically sets the value to newValue if the current value == expectedValue, with memory effects as specified by VarHandle#weakCompareAndSetPlain.

    expectedValue

    the expected value

    newValue

    the new value

    returns

    true if successful

    Annotations
    @deprecated
    Deprecated

    (Since version 9)

    See also

    #weakCompareAndSetPlain

Inherited from Number

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped