monifu.concurrent.atomic

AtomicShort

final class AtomicShort extends AtomicNumber[Short] with BlockableAtomic[Short]

Linear Supertypes
BlockableAtomic[Short], AtomicNumber[Short], Atomic[Short], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AtomicShort
  2. BlockableAtomic
  3. AtomicNumber
  4. Atomic
  5. AnyRef
  6. 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. def +=(v: Short): Unit

    Definition Classes
    AtomicShortAtomicNumber
  5. def -=(v: Short): Unit

    Definition Classes
    AtomicShortAtomicNumber
  6. def :=(value: Short): Unit

    Alias for set().

    Alias for set(). Updates the current value.

    value

    will be the new value returned by get()

    Definition Classes
    AtomicShortAtomic
  7. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  9. def add(v: Short): Unit

    Definition Classes
    AtomicShortAtomicNumber
    Annotations
    @tailrec()
  10. def addAndGet(v: Short): Short

    Definition Classes
    AtomicShortAtomicNumber
    Annotations
    @tailrec()
  11. def apply(): Short

    returns

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

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

    Definition Classes
    Any
  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def compareAndSet(expect: Short, update: Short): 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
    AtomicShortAtomic
  15. def countDownToZero(v: Short = 1): Short

    Decrements this number until it reaches zero.

    Decrements this number until it reaches zero.

    returns

    a number representing how much it was able to subtract, which is a value between zero and v

    Definition Classes
    AtomicShortAtomicNumber
    Annotations
    @tailrec()
  16. def decrement(v: Int = 1): Unit

    Definition Classes
    AtomicShortAtomicNumber
  17. def decrementAndGet(v: Int = 1): Short

    Definition Classes
    AtomicShortAtomicNumber
  18. final def eq(arg0: AnyRef): Boolean

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

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

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

    returns

    the current value persisted by this Atomic

    Definition Classes
    AtomicShortAtomic
  22. def getAndAdd(v: Short): Short

    Definition Classes
    AtomicShortAtomicNumber
    Annotations
    @tailrec()
  23. def getAndDecrement(v: Int = 1): Short

    Definition Classes
    AtomicShortAtomicNumber
  24. def getAndIncrement(v: Int = 1): Short

    Definition Classes
    AtomicShortAtomicNumber
    Annotations
    @tailrec()
  25. def getAndSet(update: Short): Short

    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
    AtomicShortAtomic
  26. def getAndSubtract(v: Short): Short

    Definition Classes
    AtomicShortAtomicNumber
    Annotations
    @tailrec()
  27. def getAndTransform(cb: (Short) ⇒ Short): Short

    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
    AtomicShortAtomic
    Annotations
    @tailrec()
  28. final def getClass(): Class[_]

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

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

    Definition Classes
    AtomicShortAtomicNumber
    Annotations
    @tailrec()
  31. def incrementAndGet(v: Int = 1): Short

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

    Definition Classes
    Any
  33. def lazySet(update: Short): Unit

    Eventually sets to the given value.

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

    Definition Classes
    AtomicShortAtomic
  34. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  37. def set(update: Short): Unit

    Updates the current value.

    Updates the current value.

    update

    will be the new value returned by get()

    Definition Classes
    AtomicShortAtomic
  38. def subtract(v: Short): Unit

    Definition Classes
    AtomicShortAtomicNumber
    Annotations
    @tailrec()
  39. def subtractAndGet(v: Short): Short

    Definition Classes
    AtomicShortAtomicNumber
    Annotations
    @tailrec()
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  41. def toString(): String

    Definition Classes
    AnyRef → Any
  42. def transform(cb: (Short) ⇒ Short): 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
    AtomicShortAtomic
    Annotations
    @tailrec()
  43. def transformAndExtract[U](cb: (Short) ⇒ (U, Short)): 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
    AtomicShortAtomic
    Annotations
    @tailrec()
  44. def transformAndGet(cb: (Short) ⇒ Short): Short

    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
    AtomicShortAtomic
    Annotations
    @tailrec()
  45. def update(value: Short): Unit

    Alias for set().

    Alias for set(). Updates the current value.

    value

    will be the new value returned by get()

    Definition Classes
    AtomicShortAtomic
  46. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. def waitForCompareAndSet(expect: Short, update: Short, waitAtMost: FiniteDuration): Unit

    Waits until the compareAndSet operation succeeds, e.

    Waits until the compareAndSet operation succeeds, e.g... 1. until the old value == expected and the operation succeeds, or 2. until the current thread is interrupted, or 3. the specified timeout is due

    So this can throw an exception on timeout, useful for when you want to insure that you don't block the current thread ad infinitum

    waitAtMost

    specifies the timeout, after which this method throws a TimeoutException

    Definition Classes
    AtomicShortBlockableAtomic
    Annotations
    @throws( classOf[InterruptedException] ) @throws( classOf[TimeoutException] )
  50. def waitForCompareAndSet(expect: Short, update: Short, maxRetries: Int): Boolean

    Waits until the compareAndSet operation succeeds, e.

    Waits until the compareAndSet operation succeeds, e.g...

    1. until the old value == expected and the operation succeeds, or 2. until the current thread is interrupted 3. until the the spin lock retried for a maximum of maxRetries

    expect

    the expected current value

    update

    the value to replace the current value

    maxRetries

    the maximum number of times to retry in case of failure

    returns

    true if the operation succeeded or false in case it failed after it retried for maxRetries times

    Definition Classes
    AtomicShortBlockableAtomic
    Annotations
    @tailrec() @throws( classOf[InterruptedException] )
  51. def waitForCompareAndSet(expect: Short, update: Short): Unit

    Waits until the compareAndSet operation succeeds, e.

    Waits until the compareAndSet operation succeeds, e.g... 1. until the old value == expected and the operation succeeds, or 2. until the current thread is interrupted

    Definition Classes
    AtomicShortBlockableAtomic
    Annotations
    @tailrec() @throws( classOf[InterruptedException] )
  52. def waitForCondition(waitAtMost: FiniteDuration, p: (Short) ⇒ Boolean): Unit

    Waits until the specified callback, that receives the current value, returns true.

    Waits until the specified callback, that receives the current value, returns true. Throws a TimeoutException in case the specified waitAtMost timeout is due.

    Definition Classes
    AtomicShortBlockableAtomic
    Annotations
    @throws( classOf[InterruptedException] ) @throws( classOf[TimeoutException] )
  53. def waitForCondition(p: (Short) ⇒ Boolean): Unit

    Waits until the specified callback, that receives the current value, returns true.

    Waits until the specified callback, that receives the current value, returns true.

    Definition Classes
    AtomicShortBlockableAtomic
    Annotations
    @tailrec() @throws( classOf[InterruptedException] )
  54. def waitForValue(expect: Short, waitAtMost: FiniteDuration): Unit

    Waits until the specified expect value == the value stored by this Atomic reference or until the current thread gets interrupted.

    Waits until the specified expect value == the value stored by this Atomic reference or until the current thread gets interrupted.

    This can throw an exception on timeout, useful for when you want to insure that you don't block the current thread ad infinitum

    waitAtMost

    specifies the timeout, after which this method throws a TimeoutException

    Definition Classes
    AtomicShortBlockableAtomic
    Annotations
    @throws( classOf[InterruptedException] ) @throws( classOf[TimeoutException] )
  55. def waitForValue(expect: Short): Unit

    Waits until the specified expect value == the value stored by this Atomic reference or until the current thread gets interrupted.

    Waits until the specified expect value == the value stored by this Atomic reference or until the current thread gets interrupted.

    Definition Classes
    AtomicShortBlockableAtomic
    Annotations
    @tailrec() @throws( classOf[InterruptedException] )

Inherited from BlockableAtomic[Short]

Inherited from AtomicNumber[Short]

Inherited from Atomic[Short]

Inherited from AnyRef

Inherited from Any

Ungrouped