public interface Timeout
| Modifier and Type | Method and Description |
|---|---|
default <A> java.util.concurrent.CompletionStage<A> |
timeout(java.util.concurrent.CompletionStage<A> stage,
java.time.Duration delay)
An alias for timeout(stage, delay, unit) that uses a java.time.Duration.
|
default <A> java.util.concurrent.CompletionStage<A> |
timeout(java.util.concurrent.CompletionStage<A> stage,
long delay,
java.util.concurrent.TimeUnit unit)
Creates a CompletionStage that returns either the input stage, or a timeout.
|
default <A> java.util.concurrent.CompletionStage<A> timeout(java.util.concurrent.CompletionStage<A> stage,
long delay,
java.util.concurrent.TimeUnit unit)
A - the completion stage that should be wrapped with a timeout.delay - The delay (expressed with the corresponding unit).unit - The time Unit.default <A> java.util.concurrent.CompletionStage<A> timeout(java.util.concurrent.CompletionStage<A> stage,
java.time.Duration delay)
A - the completion stage that should be wrapped with a future.delay - The delay (expressed with the corresponding unit).