Packages

t

refuel.internal

AtomicUpdater

trait AtomicUpdater[U, W] extends AnyRef

Self Type
AtomicUpdater[U, W] with U
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AtomicUpdater
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val updater: AtomicReferenceFieldUpdater[U, W]

Concrete 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 asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def atomicUpdate(f: (W) ⇒ W): W

    Recursive, atomic updates.

    Recursive, atomic updates. If there is an unguaranteed update of atomicity, it may loop indefinitely.

    f

    Update function.

    Attributes
    protected
    Annotations
    @tailrec()
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def compareAndSet(o: W, n: W): Boolean

    Update only if the existing data is in the expected state.

    Update only if the existing data is in the expected state. If it is not in the expected state, it will not be updated.

    o

    Expected symbol.

    n

    Update symbol.

    Attributes
    protected
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def get: W

    Returns a new reference that is the result of the snapshot.

    Returns a new reference that is the result of the snapshot.

    Attributes
    protected
  12. def getAndSet(n: W): W

    Atomically sets the field of the given object managed by this updater to the given value and returns the old value.

    Atomically sets the field of the given object managed by this updater to the given value and returns the old value.

    n

    the new value

    returns

    the previous value

    Attributes
    protected
  13. def getAndUpdate(nf: UnaryOperator[W]): W

    Atomically updates the field of the given object managed by this updater with the results of applying the given function, returning the previous value.

    Atomically updates the field of the given object managed by this updater 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.

    nf

    a side-effect-free function

    returns

    the previous value

    Attributes
    protected
    Since

    1.8

  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def getRef: W

    Gets the current value held in the field of the given object managed by this updater.

    Gets the current value held in the field of the given object managed by this updater.

    returns

    the current value

    Attributes
    protected
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. def set(n: W): Unit

    Sets the field of the given object managed by this updater to the given updated value.

    Sets the field of the given object managed by this updater to the given updated value. This operation is guaranteed to act as a volatile store with respect to subsequent invocations of compareAndSet.

    n

    the new value

    Attributes
    protected
  22. def snapshot(w: W): W

    Provides a way to create a snapshot if necessary.

    Provides a way to create a snapshot if necessary. Usually not processed.

    In that case, response is a reference, so if you change it, it may affect the value that other threads reference. To prevent this, use snapshot or compareAndSet to override snapshot and update.

    override def snapshot(w: W): W = w.snapshot()
    
    val old = getRef
    val newRef = get
    newRef.update(x -> y)
    compareAndSet(old, newRef)
    w

    value type

    Attributes
    protected
  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped