Trait

fs2.util.Async

Ref

Related Doc: package Async

Permalink

trait Ref[F[_], A] extends AnyRef

An asynchronous, concurrent mutable reference.

Self Type
Ref[F, A]
Source
Async.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Ref
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. implicit abstract val F: Async[F]

    Permalink
    Attributes
    protected
  2. abstract def access: F[(A, (Attempt[A]) ⇒ F[Boolean])]

    Permalink

    Obtain a snapshot of the current value of the Ref, and a setter for updating the value.

    Obtain a snapshot of the current value of the Ref, and a setter for updating the value. The setter may noop (in which case false is returned) if another concurrent call to access uses its setter first. Once it has noop'd or been used once, a setter never succeeds again.

  3. abstract def cancellableGet: F[(F[A], F[Unit])]

    Permalink

    Like get, but returns an F[Unit] that can be used cancel the subscription.

  4. abstract def set(a: F[A]): F[Unit]

    Permalink

    Asynchronously set a reference.

    Asynchronously set a reference. After the returned F[Unit] is bound, the task is running in the background. Multiple tasks may be added to a Ref[A].

    Satisfies: r.set(t) flatMap { _ => r.get } == t.

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Ref[F, A] to any2stringadd[Ref[F, A]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Ref[F, A], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Ref[F, A] to ArrowAssoc[Ref[F, A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def ensuring(cond: (Ref[F, A]) ⇒ Boolean, msg: ⇒ Any): Ref[F, A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Ref[F, A] to Ensuring[Ref[F, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (Ref[F, A]) ⇒ Boolean): Ref[F, A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Ref[F, A] to Ensuring[Ref[F, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): Ref[F, A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Ref[F, A] to Ensuring[Ref[F, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): Ref[F, A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Ref[F, A] to Ensuring[Ref[F, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Ref[F, A] to StringFormat[Ref[F, A]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  16. def get: F[A]

    Permalink

    Obtain the value of the Ref, or wait until it has been set.

  17. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def modify(f: (A) ⇒ A): F[Change[A]]

    Permalink

    Repeatedly invoke tryModify(f) until it succeeds.

  21. def modify2[B](f: (A) ⇒ (A, B)): F[(Change[A], B)]

    Permalink

    Like modify, but allows to extra b in single step.

    Like modify, but allows to extra b in single step. *

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def setPure(a: A): F[Unit]

    Permalink

    Asynchronously set a reference to a pure value.

    Asynchronously set a reference to a pure value.

    Satisfies: r.setPure(a) flatMap { _ => r.get(a) } == pure(a).

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. def tryModify(f: (A) ⇒ A): F[Option[Change[A]]]

    Permalink

    Try modifying the reference once, returning None if another concurrent set or modify completes between the time the variable is read and the time it is set.

  29. def tryModify2[B](f: (A) ⇒ (A, B)): F[Option[(Change[A], B)]]

    Permalink

    Like tryModify but allows to return B along with change.

    Like tryModify but allows to return B along with change. *

  30. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def [B](y: B): (Ref[F, A], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Ref[F, A] to ArrowAssoc[Ref[F, A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Ref[F, A] to any2stringadd[Ref[F, A]]

Inherited by implicit conversion StringFormat from Ref[F, A] to StringFormat[Ref[F, A]]

Inherited by implicit conversion Ensuring from Ref[F, A] to Ensuring[Ref[F, A]]

Inherited by implicit conversion ArrowAssoc from Ref[F, A] to ArrowAssoc[Ref[F, A]]

Ungrouped