Class/Object

fs2.util

Task

Related Docs: object Task | package util

Permalink

class Task[+A] extends AnyRef

Source
Task.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Task
  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 Task(get: Future[Either[Throwable, A]])

    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 Task[A] to any2stringadd[Task[A]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Task[A], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Task[A] to ArrowAssoc[Task[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 async(implicit S: Strategy): Task[A]

    Permalink

    Returns a task that performs all evaluation asynchronously.

  8. def attempt: Task[Either[Throwable, A]]

    Permalink

    'Catches' exceptions in the given task and returns them as values.

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def ensure(failure: ⇒ Throwable)(f: (A) ⇒ Boolean): Task[A]

    Permalink

    Ensures the result of this Task satisfies the given predicate, or fails with the given value.

  11. def ensuring(cond: (Task[A]) ⇒ Boolean, msg: ⇒ Any): Task[A]

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

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

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def flatMap[B](f: (A) ⇒ Task[B]): Task[B]

    Permalink
  19. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Task[A] to StringFormat[Task[A]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  20. val get: Future[Either[Throwable, A]]

    Permalink
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def handle[B >: A](f: PartialFunction[Throwable, B]): Task[B]

    Permalink

    Calls attempt and handles some exceptions using the given partial function, calling Task.now on the result.

    Calls attempt and handles some exceptions using the given partial function, calling Task.now on the result. Any nonmatching exceptions are reraised.

  23. def handleWith[B >: A](f: PartialFunction[Throwable, Task[B]]): Task[B]

    Permalink

    Calls attempt and handles some exceptions using the given partial function.

    Calls attempt and handles some exceptions using the given partial function. Any nonmatching exceptions are reraised.

  24. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  26. def map[B](f: (A) ⇒ B): Task[B]

    Permalink
  27. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  30. def onFinish(f: (Option[Throwable]) ⇒ Task[Unit]): Task[A]

    Permalink

    Returns a new Task in which f is scheduled to be run on completion.

    Returns a new Task in which f is scheduled to be run on completion. This would typically be used to release any resources acquired by this Task.

  31. def or[B >: A](t2: Task[B]): Task[B]

    Permalink

    Runs this Task, and if it fails with an exception, runs t2.

    Runs this Task, and if it fails with an exception, runs t2. This is rather coarse-grained. Use attempt, handle, and flatMap for more fine grained control of exception handling.

  32. def race[B](t: Task[B])(implicit S: Strategy): Task[Either[A, B]]

    Permalink

    Returns a Task that, when run, races evaluation of this and t, and returns the result of whichever completes first.

    Returns a Task that, when run, races evaluation of this and t, and returns the result of whichever completes first. The losing task continues to execute in the background though its result will be sent nowhere.

  33. def schedule(delay: FiniteDuration)(implicit strategy: Strategy, scheduler: Scheduler): Task[A]

    Permalink

    Create a Task that will evaluate a after at least the given delay.

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

    Permalink
    Definition Classes
    AnyRef
  35. def timed(timeout: FiniteDuration)(implicit S: Strategy, scheduler: Scheduler): Task[A]

    Permalink

    A Task which returns a TimeoutException after timeout, and attempts to cancel the running computation.

  36. def toString(): String

    Permalink
    Definition Classes
    Task → AnyRef → Any
  37. def unsafeAttemptRun: Either[Throwable, A]

    Permalink

    Like run, but returns exceptions as values.

  38. def unsafeAttemptRunFor(timeout: FiniteDuration): Either[Throwable, A]

    Permalink

    Like unsafeRunFor, but returns exceptions as values.

    Like unsafeRunFor, but returns exceptions as values. Both TimeoutException and other exceptions will be folded into the same Throwable.

  39. def unsafeRun: A

    Permalink

    Run this Task and block until its result is available.

    Run this Task and block until its result is available. This will throw any exceptions generated by the Task. To return exceptions in an Either, use unsafeAttemptRun.

  40. def unsafeRunAsync(f: (Either[Throwable, A]) ⇒ Unit): Unit

    Permalink

    Run this computation to obtain either a result or an exception, then invoke the given callback.

    Run this computation to obtain either a result or an exception, then invoke the given callback. Any pure, non-asynchronous computation at the head of this Future will be forced in the calling thread. At the first Async encountered, control is transferred to whatever thread backs the Async and this function returns immediately.

  41. def unsafeRunAsyncFuture: Future[A]

    Permalink

    Run this computation and return the result as a standard library Future.

    Run this computation and return the result as a standard library Future. Like unsafeRunAsync but returns a standard library Future instead of requiring a callback.

  42. def unsafeRunFor(timeout: FiniteDuration): A

    Permalink

    Run this Task and block until its result is available, or until timeout has elapsed, at which point a TimeoutException will be thrown and the Future will attempt to be canceled.

  43. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def [B](y: B): (Task[A], B)

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

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Task[A] to any2stringadd[Task[A]]

Inherited by implicit conversion StringFormat from Task[A] to StringFormat[Task[A]]

Inherited by implicit conversion Ensuring from Task[A] to Ensuring[Task[A]]

Inherited by implicit conversion ArrowAssoc from Task[A] to ArrowAssoc[Task[A]]

Ungrouped