Class

s_mach.concurrent

SMach_Concurrent_PimpMyFuture

Related Doc: package concurrent

Permalink

implicit final class SMach_Concurrent_PimpMyFuture[A] extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SMach_Concurrent_PimpMyFuture
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SMach_Concurrent_PimpMyFuture(self: Future[A])

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def background(implicit ec: ExecutionContext): Unit

    Permalink

    Run future in the background.

    Run future in the background. Discard the result of this Future but ensure if there is an exception it gets reported to the ExecutionContext

  6. def flatFold[X](onSuccess: (A) ⇒ Future[X], onFailure: (Throwable) ⇒ Future[X])(implicit ec: ExecutionContext): Future[X]

    Permalink

    returns

    a Future of X that always succeeds. If self is successful, X is derived from onSuccess otherwise if self is a failure, X is derived from onFailure.

  7. def fold[X](onSuccess: (A) ⇒ X, onFailure: (Throwable) ⇒ X)(implicit ec: ExecutionContext): Future[X]

    Permalink

    returns

    a Future of X that always succeeds. If self is successful, X is derived from onSuccess otherwise if self is a failure, X is derived from onFailure.

  8. def get(max: Duration): A

    Permalink

    returns

    the result of the Future after it completes

    Exceptions thrown

    java.util.concurrent.TimeoutException if Future does not complete within max duration

  9. def get: A

    Permalink

    returns

    the result of the Future after it completes (Note: this waits indefinitely for the Future to complete)

    Exceptions thrown

    java.lang.Exception Future completed with a failure, throws the exception

  10. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  11. def getTry(max: Duration): Try[A]

    Permalink

    returns

    the Try result of the Future after it completes

    Exceptions thrown

    java.util.concurrent.TimeoutException if Future does not complete within max duration

  12. def getTry: Try[A]

    Permalink

    returns

    the Try result of the Future after it completes (Note: this waits indefinitely for the Future to complete)

  13. def happensBefore[B](other: ⇒ Future[B])(implicit ec: ExecutionContext): DeferredFuture[B]

    Permalink

    returns

    a future of A that is guaranteed to happen before lhs

  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def onTimeout(timeout: FiniteDuration)(fallback: ⇒ Future[A])(implicit ec: ExecutionContext, sec: ScheduledExecutionContext): Future[A]

    Permalink

    returns

    a future that completes with fallback if the specified timeout is exceeded, otherwise the completed result of the future

  16. val self: Future[A]

    Permalink
  17. def sideEffect(sideEffect: ⇒ Unit)(implicit ec: ExecutionContext): Future[A]

    Permalink

    returns

    execute a side effect after a future completes (even if it fails)

  18. def toString(): String

    Permalink
    Definition Classes
    Any
  19. def toTry(implicit ec: ExecutionContext): Future[Try[A]]

    Permalink

    returns

    a Future of a Try of the result that always completes successfully even if the Future eventually throws an exception

Inherited from AnyVal

Inherited from Any

Ungrouped