@Deprecated
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)
Deprecated.
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)
Deprecated.
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 type in the completion stagestage
- 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 type in the completion stagestage
- the completion stage that should be wrapped with a future.delay
- The delay (expressed with the corresponding unit).