Package org.apache.pekko.pattern
Interface FutureTimeoutSupport
public interface FutureTimeoutSupport
-
Method Summary
Modifier and TypeMethodDescription<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 aFuturethat 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 aFuturethat will be completed with the success or failure of the provided value after the specified duration.<T> CompletionStage<T>afterCompletionStage(Duration duration, Scheduler using, scala.Function0<CompletionStage<T>> value, scala.concurrent.ExecutionContext ec) Returns aCompletionStagethat will be completed with the success or failure of the provided value after the specified duration.<T> CompletionStage<T>afterCompletionStage(Duration duration, scala.Function0<CompletionStage<T>> value, ClassicActorSystemProvider system) Returns aCompletionStagethat 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 aFuturethat will be completed with aTimeoutExceptionif the provided value is not completed within the specified duration.<T> CompletionStage<T>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 aFuturethat 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 aFuturethat 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 aCompletionStagethat 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 aCompletionStagethat 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 aFuturethat will be completed with aTimeoutExceptionif 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 aCompletionStagethat will be completed with aTimeoutExceptionif the provided value is not completed within the specified duration.- Since:
- 1.2.0
-