public class Futures
extends java.lang.Object
Constructor and Description |
---|
Futures() |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.concurrent.CompletableFuture<T> |
failAfter(java.time.Duration duration)
Returns
CompletableFuture that fails after certain amount of time. |
static <T> java.util.concurrent.CompletableFuture<T> |
failAfter(long duration)
Returns
CompletableFuture that fails after certain number of milliseconds. |
static <T> java.util.concurrent.CompletableFuture<T> |
within(java.util.concurrent.CompletableFuture<T> future,
java.time.Duration duration) |
static <T> java.util.concurrent.CompletableFuture<T> |
within(java.util.concurrent.CompletableFuture<T> future,
long duration) |
public static <T> java.util.concurrent.CompletableFuture<T> failAfter(long duration)
CompletableFuture
that fails after certain number of milliseconds.public static <T> java.util.concurrent.CompletableFuture<T> failAfter(java.time.Duration duration)
CompletableFuture
that fails after certain amount of time.public static <T> java.util.concurrent.CompletableFuture<T> within(java.util.concurrent.CompletableFuture<T> future, java.time.Duration duration)
public static <T> java.util.concurrent.CompletableFuture<T> within(java.util.concurrent.CompletableFuture<T> future, long duration)
Copyright © 2003-present Jodd Team