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
ConstructorsConstructorDescriptionAsyncTimeoutTask(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, waitMethods 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- theCompletableFutureto failexceptionSupplier- the exceptionSupplier to thrown
-
-
Method Details
-
run
-
hasExecuted
public boolean hasExecuted()- Specified by:
hasExecutedin interfaceTimeoutTask- Returns:
- True if timeout task has executed. False otherwise
-