asterix.atomic

AtomicLong

final class AtomicLong extends AtomicNumber[Long]

Linear Supertypes
AtomicNumber[Long], Atomic[Long], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AtomicLong
  2. AtomicNumber
  3. Atomic
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def add(v: Long): Unit

    Definition Classes
    AtomicLongAtomicNumber
    Annotations
    @tailrec()
  7. def addAndGet(v: Long): Long

    Definition Classes
    AtomicLongAtomicNumber
    Annotations
    @tailrec()
  8. def apply(): Long

    returns

    the current value persisted by this Atomic, an alias for get()

    Definition Classes
    Atomic
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def compareAndSet(expect: Long, update: Long): Boolean

    Does a compare-and-set operation on the current value.

    Does a compare-and-set operation on the current value. For more info, checkout the related Compare-and-swap Wikipedia page.

    It's an atomic, worry free operation.

    expect

    is the value you expect to be persisted when the operation happens

    update

    will be the new value, should the check for expect succeeds

    returns

    either true in case the operation succeeded or false otherwise

    Definition Classes
    AtomicLongAtomic
  12. def decrement(v: Int = 1): Unit

    Definition Classes
    AtomicLongAtomicNumber
  13. def decrementAndGet(v: Int = 1): Long

    Definition Classes
    AtomicLongAtomicNumber
  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def get: Long

    returns

    the current value persisted by this Atomic

    Definition Classes
    AtomicLongAtomic
  18. def getAndAdd(v: Long): Long

    Definition Classes
    AtomicLongAtomicNumber
    Annotations
    @tailrec()
  19. def getAndDecrement(v: Int = 1): Long

    Definition Classes
    AtomicLongAtomicNumber
  20. def getAndIncrement(v: Int = 1): Long

    Definition Classes
    AtomicLongAtomicNumber
    Annotations
    @tailrec()
  21. def getAndSet(update: Long): Long

    Sets the persisted value to update and returns the old value that was in place.

    Sets the persisted value to update and returns the old value that was in place. It's an atomic, worry free operation.

    Definition Classes
    AtomicLongAtomic
  22. def getAndSubtract(v: Long): Long

    Definition Classes
    AtomicLongAtomicNumber
  23. def getAndTransform(cb: (Long) ⇒ Long): Long

    Abstracts over compareAndSet.

    Abstracts over compareAndSet. You specify a transformation by specifying a callback to be executed, a callback that transforms the current value. This method will loop until it will succeed in replacing the current value with the one produced by the given callback.

    Note that the callback will be executed on each iteration of the loop, so it can be called multiple times - don't do destructive I/O or operations that mutate global state in it.

    cb

    is a callback that receives the current value as input and returns the update which is the new value that should be persisted

    returns

    the old value, just prior to when the successful update happened

    Definition Classes
    AtomicLongAtomic
    Annotations
    @tailrec()
  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  26. def increment(v: Int = 1): Unit

    Definition Classes
    AtomicLongAtomicNumber
    Annotations
    @tailrec()
  27. def incrementAndGet(v: Int = 1): Long

    Definition Classes
    AtomicLongAtomicNumber
    Annotations
    @tailrec()
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. def lazySet(update: Long): Unit

    Eventually sets to the given value.

    Eventually sets to the given value. Has weaker visibility guarantees than the normal set().

    Definition Classes
    AtomicLongAtomic
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def set(update: Long): Unit

    Updates the current value.

    Updates the current value.

    update

    will be the new value returned by get()

    Definition Classes
    AtomicLongAtomic
  34. def subtract(v: Long): Unit

    Definition Classes
    AtomicLongAtomicNumber
  35. def subtractAndGet(v: Long): Long

    Definition Classes
    AtomicLongAtomicNumber
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  37. def toString(): String

    Definition Classes
    AtomicLong → AnyRef → Any
  38. def transform(cb: (Long) ⇒ Long): Unit

    Abstracts over compareAndSet.

    Abstracts over compareAndSet. You specify a transformation by specifying a callback to be executed, a callback that transforms the current value. This method will loop until it will succeed in replacing the current value with the one produced by the given callback.

    Note that the callback will be executed on each iteration of the loop, so it can be called multiple times - don't do destructive I/O or operations that mutate global state in it.

    cb

    is a callback that receives the current value as input and returns the update which is the new value that should be persisted

    Definition Classes
    AtomicLongAtomic
    Annotations
    @tailrec()
  39. def transformAndExtract[U](cb: (Long) ⇒ (U, Long)): U

    Abstracts over compareAndSet.

    Abstracts over compareAndSet. You specify a transformation by specifying a callback to be executed, a callback that transforms the current value. This method will loop until it will succeed in replacing the current value with the one produced by your callback.

    Note that the callback will be executed on each iteration of the loop, so it can be called multiple times - don't do destructive I/O or operations that mutate global state in it.

    cb

    is a callback that receives the current value as input and returns a tuple that specifies the update + what should this method return when the operation succeeds.

    returns

    whatever was specified by your callback, once the operation succeeds

    Definition Classes
    AtomicLongAtomic
    Annotations
    @tailrec()
  40. def transformAndGet(cb: (Long) ⇒ Long): Long

    Abstracts over compareAndSet.

    Abstracts over compareAndSet. You specify a transformation by specifying a callback to be executed, a callback that transforms the current value. This method will loop until it will succeed in replacing the current value with the one produced by the given callback.

    Note that the callback will be executed on each iteration of the loop, so it can be called multiple times - don't do destructive I/O or operations that mutate global state in it.

    cb

    is a callback that receives the current value as input and returns the update which is the new value that should be persisted

    returns

    whatever the update is, after the operation succeeds

    Definition Classes
    AtomicLongAtomic
    Annotations
    @tailrec()
  41. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AtomicNumber[Long]

Inherited from Atomic[Long]

Inherited from AnyRef

Inherited from Any

Ungrouped