monifu.concurrent.extensions

FutureExtensions

implicit final class FutureExtensions[T] extends AnyVal

Provides utility methods added on Scala's concurrent.Future

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FutureExtensions
  2. AnyVal
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

Value Members

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

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

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

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

    Definition Classes
    Any
  5. def ensureDuration(atLeast: FiniteDuration, atMost: Duration = Duration.Inf)(implicit s: Scheduler): Future[T]

    Returns a new Future that takes atLeast and atMost time to execute.

    Returns a new Future that takes atLeast and atMost time to execute.

    atLeast

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

    atMost

    the maximum duration that the returned future will take to complete (otherwise it gets completed with a TimeoutException)

    s

    the implicit scheduler that handles the time scheduling

    returns

    a new Future whose execution time is within the specified bounds

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

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

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

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

  9. val source: Future[T]

  10. def toString(): String

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

    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 implicit Scheduler, needed for completing our internal promise

Inherited from AnyVal

Inherited from Any

Ungrouped