monix.eval.Coeval

Attempt

sealed abstract class Attempt[+A] extends Coeval[A] with Product

The Attempt represents a strict, already evaluated result of a Coeval that either resulted in success, wrapped in a Now, or in an error, wrapped in a Error.

It's the moral equivalent of scala.util.Try.

Self Type
Attempt[A]
Linear Supertypes
Product, Equals, Coeval[A], Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Attempt
  2. Product
  3. Equals
  4. Coeval
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Attempt()

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean

    Definition Classes
    Equals
  2. abstract def productArity: Int

    Definition Classes
    Product
  3. abstract def productElement(n: Int): Any

    Definition Classes
    Product

Concrete 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. final def ==(arg0: AnyRef): Boolean

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

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

    Definition Classes
    Any
  7. def asScala: Try[A]

    Converts this attempt into a scala.util.Try.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def dematerialize[B](implicit ev: <:<[A, Try[B]]): Coeval[B]

    Dematerializes the source's result from a Try.

    Dematerializes the source's result from a Try.

    Definition Classes
    Coeval
  10. def dematerializeAttempt[B](implicit ev: <:<[A, Attempt[B]]): Attempt[B]

    Dematerializes the source's result from an Attempt.

    Dematerializes the source's result from an Attempt.

    Definition Classes
    AttemptCoeval
  11. def doOnFinish(f: (Option[Throwable]) ⇒ Coeval[Unit]): Coeval[A]

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

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

    Definition Classes
    Coeval
  12. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  14. def failed: Attempt[Throwable]

    Returns a failed projection of this coeval.

    Returns a failed projection of this coeval.

    The failed projection is a future holding a value of type Throwable, emitting a value which is the throwable of the original coeval in case the original coeval fails, otherwise if the source succeeds, then it fails with a NoSuchElementException.

    Definition Classes
    AttemptCoeval
  15. def finalize(): Unit

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

    Creates a new Coeval by applying a function to the successful result of the source, and returns a new instance equivalent to the result of the function.

    Creates a new Coeval by applying a function to the successful result of the source, and returns a new instance equivalent to the result of the function.

    Definition Classes
    Coeval
  17. def flatten[B](implicit ev: <:<[A, Coeval[B]]): Coeval[B]

    Given a source Coeval that emits another Coeval, this function flattens the result, returning a Coeval equivalent to the emitted Coeval by the source.

    Given a source Coeval that emits another Coeval, this function flattens the result, returning a Coeval equivalent to the emitted Coeval by the source.

    Definition Classes
    Coeval
  18. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  20. def isFailure: Boolean

    Returns true if result is an error.

  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. def isSuccess: Boolean

    Returns true if value is a successful one.

  23. def map[B](f: (A) ⇒ B): Coeval[B]

    Returns a new Coeval that applies the mapping function to the element emitted by the source.

    Returns a new Coeval that applies the mapping function to the element emitted by the source.

    Definition Classes
    Coeval
  24. def materialize: Coeval[Try[A]]

    Creates a new Coeval that will expose any triggered error from the source.

    Creates a new Coeval that will expose any triggered error from the source.

    Definition Classes
    Coeval
  25. def materializeAttempt: Attempt[Attempt[A]]

    Creates a new Coeval that will expose any triggered error from the source.

    Creates a new Coeval that will expose any triggered error from the source.

    Definition Classes
    AttemptCoeval
  26. def memoize: Attempt[A]

    Memoizes the result on the computation and reuses it on subsequent invocations of runAsync.

    Memoizes the result on the computation and reuses it on subsequent invocations of runAsync.

    Definition Classes
    AttemptCoeval
  27. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  30. def onErrorFallbackTo[B >: A](that: Coeval[B]): Coeval[B]

    Creates a new coeval that in case of error will fallback to the given backup coeval.

    Creates a new coeval that in case of error will fallback to the given backup coeval.

    Definition Classes
    Coeval
  31. def onErrorHandle[U >: A](f: (Throwable) ⇒ U): Coeval[U]

    Creates a new coeval that will handle any matching throwable that this coeval might emit.

    Creates a new coeval that will handle any matching throwable that this coeval might emit.

    See onErrorRecover for the version that takes a partial function.

    Definition Classes
    Coeval
  32. def onErrorHandleWith[B >: A](f: (Throwable) ⇒ Coeval[B]): Coeval[B]

    Creates a new coeval that will handle any matching throwable that this coeval might emit by executing another coeval.

    Creates a new coeval that will handle any matching throwable that this coeval might emit by executing another coeval.

    See onErrorRecoverWith for the version that takes a partial function.

    Definition Classes
    Coeval
  33. def onErrorRecover[U >: A](pf: PartialFunction[Throwable, U]): Coeval[U]

    Creates a new coeval that on error will try to map the error to another value using the provided partial function.

    Creates a new coeval that on error will try to map the error to another value using the provided partial function.

    See onErrorHandle for the version that takes a total function.

    Definition Classes
    Coeval
  34. def onErrorRecoverWith[B >: A](pf: PartialFunction[Throwable, Coeval[B]]): Coeval[B]

    Creates a new coeval that will try recovering from an error by matching it with another coeval using the given partial function.

    Creates a new coeval that will try recovering from an error by matching it with another coeval using the given partial function.

    See onErrorHandleWith for the version that takes a total function.

    Definition Classes
    Coeval
  35. def onErrorRestart(maxRetries: Long): Coeval[A]

    Creates a new coeval that in case of error will retry executing the source again and again, until it succeeds.

    Creates a new coeval that in case of error will retry executing the source again and again, until it succeeds.

    In case of continuous failure the total number of executions will be maxRetries + 1.

    Definition Classes
    Coeval
  36. def onErrorRestartIf(p: (Throwable) ⇒ Boolean): Coeval[A]

    Creates a new coeval that in case of error will retry executing the source again and again, until it succeeds.

    Creates a new coeval that in case of error will retry executing the source again and again, until it succeeds.

    In case of continuous failure the total number of executions will be maxRetries + 1.

    Definition Classes
    Coeval
  37. def productIterator: Iterator[Any]

    Definition Classes
    Product
  38. def productPrefix: String

    Definition Classes
    Product
  39. def restartUntil(p: (A) ⇒ Boolean): Coeval[A]

    Given a predicate function, keep retrying the coeval until the function returns true.

    Given a predicate function, keep retrying the coeval until the function returns true.

    Definition Classes
    Coeval
  40. def runAttempt: Attempt[A]

    Evaluates the underlying computation and returns the result or any triggered errors as a Coeval.Attempt.

    Evaluates the underlying computation and returns the result or any triggered errors as a Coeval.Attempt.

    Definition Classes
    Coeval
  41. def runTry: Try[A]

    Evaluates the underlying computation and returns the result or any triggered errors as a scala.util.Try.

    Evaluates the underlying computation and returns the result or any triggered errors as a scala.util.Try.

    Definition Classes
    Coeval
  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  43. def task: Task[A]

    Converts the source Coeval into a Task.

    Converts the source Coeval into a Task.

    Definition Classes
    Coeval
  44. def toString(): String

    Definition Classes
    AnyRef → Any
  45. def value: A

    Evaluates the underlying computation and returns the result.

    Evaluates the underlying computation and returns the result.

    NOTE: this can throw exceptions.

    Definition Classes
    Coeval
  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 zip[B](that: Coeval[B]): Coeval[(A, B)]

    Zips the values of this and that coeval, and creates a new coeval that will emit the tuple of their results.

    Zips the values of this and that coeval, and creates a new coeval that will emit the tuple of their results.

    Definition Classes
    Coeval
  50. def zipMap[B, C](that: Coeval[B])(f: (A, B) ⇒ C): Coeval[C]

    Zips the values of this and that and applies the given mapping function on their results.

    Zips the values of this and that and applies the given mapping function on their results.

    Definition Classes
    Coeval

Deprecated Value Members

  1. def zipWith[B, C](that: Coeval[B])(f: (A, B) ⇒ C): Coeval[C]

    Definition Classes
    Coeval
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0-RC12) Renamed, please use Coeval.zipMap

Inherited from Product

Inherited from Equals

Inherited from Coeval[A]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped