Class CancelOnInterruptWrapper<ResultT>
java.lang.Object
software.amazon.awssdk.http.apache5.internal.utils.CancelOnInterruptWrapper<ResultT>
- All Implemented Interfaces:
Future<ResultT>
@SdkInternalApi
public final class CancelOnInterruptWrapper<ResultT>
extends Object
implements Future<ResultT>
Wrapper that attempts to cancel the delegate future if the thread is interrupted within get().
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CancelOnInterruptWrapper
-
-
Method Details
-
cancel
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<ResultT>
-
isDone
-
get
- Specified by:
getin interfaceFuture<ResultT>- Throws:
InterruptedExceptionExecutionException
-
get
public ResultT get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<ResultT>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-