Class AsyncTimeoutTask
java.lang.Object
software.amazon.awssdk.core.internal.http.timers.AsyncTimeoutTask
- All Implemented Interfaces:
Runnable
,TimeoutTask
Implementation of
TimeoutTask
for asynchronous operations to be scheduled to fail
the CompletableFuture
and abort the asynchronous requests.-
Constructor Summary
ConstructorDescriptionAsyncTimeoutTask
(CompletableFuture<?> completableFuture, Supplier<SdkClientException> exceptionSupplier) Constructs a newAsyncTimeoutTask
. -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.core.internal.http.timers.TimeoutTask
abortable, cancel
-
Constructor Details
-
AsyncTimeoutTask
public AsyncTimeoutTask(CompletableFuture<?> completableFuture, Supplier<SdkClientException> exceptionSupplier) Constructs a newAsyncTimeoutTask
.- Parameters:
completableFuture
- theCompletableFuture
to failexceptionSupplier
- the exceptionSupplier to thrown
-
-
Method Details
-
run
public void run() -
hasExecuted
public boolean hasExecuted()- Specified by:
hasExecuted
in interfaceTimeoutTask
- Returns:
- True if timeout task has executed. False otherwise
-