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 ofTimeoutTask
for asynchronous operations to be scheduled to fail theCompletableFuture
and 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 boolean
hasExecuted()
void
run()
-
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
- theCompletableFuture
to failexceptionSupplier
- the exceptionSupplier to thrown
-
-
Method Detail
-
hasExecuted
public boolean hasExecuted()
- Specified by:
hasExecuted
in interfaceTimeoutTask
- Returns:
- True if timeout task has executed. False otherwise
-
-