Class

monifu.concurrent.extensions

FutureExtensions

Related Doc: package extensions

Permalink

implicit final class FutureExtensions[T] extends AnyVal

Provides utility methods added on Scala's concurrent.Future

Source
extensions.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FutureExtensions
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FutureExtensions(source: Future[T])

    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 getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  7. def liftTry(implicit ec: ExecutionContext): Future[Try[T]]

    Permalink

    Utility that lifts a Future[T] into a Future[Try[T]], just because it is useful sometimes.

  8. val source: Future[T]

    Permalink
  9. def toString(): String

    Permalink
    Definition Classes
    Any
  10. def withMinDuration(atLeast: FiniteDuration)(implicit s: Scheduler): Future[T]

    Permalink

    Returns a new Future that takes a minimum amount of time to execute, specified by atLeast.

    Returns a new Future that takes a minimum amount of time to execute, specified by atLeast.

    atLeast

    the minimal duration that the returned future will take to complete.

    s

    the implicit scheduler that handles the scheduling and the execution

    returns

    a new Future whose execution time is within the specified bounds

  11. def withTimeout(atMost: FiniteDuration)(implicit s: Scheduler): Future[T]

    Permalink

    Combinator that returns a new Future that either completes with the original Future's result or with a TimeoutException in case the maximum wait time was exceeded.

    Combinator that returns a new Future that either completes with the original Future's result or with a TimeoutException in case the maximum wait time was exceeded.

    atMost

    specifies the maximum wait time until the future is terminated with a TimeoutException

    s

    is the Scheduler, needed for completing our internal promise

    returns

    a new future that will either complete with the result of our source or fail in case the timeout is reached.

Inherited from AnyVal

Inherited from Any

Ungrouped