Interface FutureTimeoutSupport


public interface FutureTimeoutSupport
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> scala.concurrent.Future<T>
    after(scala.concurrent.duration.FiniteDuration duration, Scheduler using, scala.Function0<scala.concurrent.Future<T>> value, scala.concurrent.ExecutionContext ec)
    Returns a Future that will be completed with the success or failure of the provided value after the specified duration.
    <T> scala.concurrent.Future<T>
    after(scala.concurrent.duration.FiniteDuration duration, scala.Function0<scala.concurrent.Future<T>> value, ClassicActorSystemProvider system)
    Returns a Future that will be completed with the success or failure of the provided value after the specified duration.
    afterCompletionStage(Duration duration, Scheduler using, scala.Function0<CompletionStage<T>> value, scala.concurrent.ExecutionContext ec)
    Returns a CompletionStage that will be completed with the success or failure of the provided value after the specified duration.
    afterCompletionStage(Duration duration, scala.Function0<CompletionStage<T>> value, ClassicActorSystemProvider system)
    Returns a CompletionStage that will be completed with the success or failure of the provided value after the specified duration.
    <T> scala.concurrent.Future<T>
    timeout(scala.concurrent.duration.FiniteDuration duration, Scheduler using, scala.Function0<scala.concurrent.Future<T>> value, scala.concurrent.ExecutionContext ec)
    Returns a Future that will be completed with a TimeoutException if the provided value is not completed within the specified duration.
    timeoutCompletionStage(Duration duration, Scheduler using, scala.Function0<CompletionStage<T>> value, scala.concurrent.ExecutionContext ec)
    Deprecated.
    Use `CompletableFuture#orTimeout instead.
  • Method Details

    • after

      <T> scala.concurrent.Future<T> after(scala.concurrent.duration.FiniteDuration duration, scala.Function0<scala.concurrent.Future<T>> value, ClassicActorSystemProvider system)
      Returns a Future that will be completed with the success or failure of the provided value after the specified duration.
    • after

      <T> scala.concurrent.Future<T> after(scala.concurrent.duration.FiniteDuration duration, Scheduler using, scala.Function0<scala.concurrent.Future<T>> value, scala.concurrent.ExecutionContext ec)
      Returns a Future that will be completed with the success or failure of the provided value after the specified duration.
    • afterCompletionStage

      <T> CompletionStage<T> afterCompletionStage(Duration duration, scala.Function0<CompletionStage<T>> value, ClassicActorSystemProvider system)
      Returns a CompletionStage that will be completed with the success or failure of the provided value after the specified duration.
    • afterCompletionStage

      <T> CompletionStage<T> afterCompletionStage(Duration duration, Scheduler using, scala.Function0<CompletionStage<T>> value, scala.concurrent.ExecutionContext ec)
      Returns a CompletionStage that will be completed with the success or failure of the provided value after the specified duration.
    • timeout

      <T> scala.concurrent.Future<T> timeout(scala.concurrent.duration.FiniteDuration duration, Scheduler using, scala.Function0<scala.concurrent.Future<T>> value, scala.concurrent.ExecutionContext ec)
      Returns a Future that will be completed with a TimeoutException if the provided value is not completed within the specified duration.
      Since:
      1.2.0
    • timeoutCompletionStage

      <T> CompletionStage<T> timeoutCompletionStage(Duration duration, Scheduler using, scala.Function0<CompletionStage<T>> value, scala.concurrent.ExecutionContext ec)
      Deprecated.
      Use `CompletableFuture#orTimeout instead. Since 2.0.0.
      Returns a CompletionStage that will be completed with a TimeoutException if the provided value is not completed within the specified duration.
      Since:
      1.2.0