Class/Object

fs2.async

Ref

Related Docs: object Ref | package async

Permalink

final class Ref[F[_], A] extends AnyRef

An asynchronous, concurrent mutable reference.

Self Type
Ref[F, A]
Source
Ref.scala
Linear Supertypes
AnyRef, Any
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

Instance Constructors

  1. new Ref()(implicit F: Effect[F], ec: ExecutionContext)

    Permalink

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. def access: F[(A, (Either[Throwable, A]) ⇒ F[Boolean])]

    Permalink

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

    Obtains 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.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def cancellableGet: F[(F[A], F[Unit])]

    Permalink

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

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. 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
  11. 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
  12. 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
  13. 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
  14. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. 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()
  18. def get: F[A]

    Permalink

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

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

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

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

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

    Permalink

    Repeatedly invokes tryModify(f) until it succeeds.

  23. 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. *

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

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

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

    Permalink
    Definition Classes
    AnyRef
  27. def race(f1: F[A], f2: F[A]): F[Unit]

    Permalink

    Runs f1 and f2 simultaneously, but only the winner gets to set to this ref.

    Runs f1 and f2 simultaneously, but only the winner gets to set to this ref. The loser continues running but its reference to this ref is severed, allowing this ref to be garbage collected if it is no longer referenced by anyone other than the loser.

  28. def setAsync(fa: F[A]): F[Unit]

    Permalink

    *Asynchronously* sets a reference.

    *Asynchronously* sets 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.setAsync(fa) flatMap { _ => r.get } == fa

  29. def setAsyncPure(a: A): F[Unit]

    Permalink

    *Asynchronously* sets a reference to a pure value.

    *Asynchronously* sets a reference to a pure value.

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

  30. def setSync(fa: F[A]): F[Unit]

    Permalink

    *Synchronously* sets a reference.

    *Synchronously* sets a reference. The returned value completes evaluating after the reference has been successfully set.

  31. def setSyncPure(a: A): F[Unit]

    Permalink

    *Synchronously* sets a reference to a pure value.

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

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

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

    Permalink

    Tries 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.

  35. 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. *

  36. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. 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