Class AsyncTimeoutTask
- java.lang.Object
-
- software.amazon.awssdk.core.internal.http.timers.AsyncTimeoutTask
-
- All Implemented Interfaces:
Runnable,TimeoutTask
public final class AsyncTimeoutTask extends Object implements TimeoutTask
Implementation ofTimeoutTaskfor asynchronous operations to be scheduled to fail theCompletableFutureand abort the asynchronous requests.
-
-
Constructor Summary
Constructors Constructor Description AsyncTimeoutTask(CompletableFuture<?> completableFuture, Supplier<SdkClientException> exceptionSupplier)Constructs a newAsyncTimeoutTask.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasExecuted()voidrun()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.internal.http.timers.TimeoutTask
abortable, cancel
-
-
-
-
Constructor Detail
-
AsyncTimeoutTask
public AsyncTimeoutTask(CompletableFuture<?> completableFuture, Supplier<SdkClientException> exceptionSupplier)
Constructs a newAsyncTimeoutTask.- Parameters:
completableFuture- theCompletableFutureto failexceptionSupplier- the exceptionSupplier to thrown
-
-
Method Detail
-
hasExecuted
public boolean hasExecuted()
- Specified by:
hasExecutedin interfaceTimeoutTask- Returns:
- True if timeout task has executed. False otherwise
-
-