Class WaiterExecutorHelper<T>
- java.lang.Object
-
- software.amazon.awssdk.core.internal.waiters.WaiterExecutorHelper<T>
-
@SdkInternalApi public final class WaiterExecutorHelper<T> extends Object
The waiter executor helper class. Contains the logic shared byWaiterExecutorandAsyncWaiterExecutor
-
-
Constructor Summary
Constructors Constructor Description WaiterExecutorHelper(List<WaiterAcceptor<? super T>> waiterAcceptors, WaiterConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcomputeNextDelayInMills(int attemptNumber)WaiterResponse<T>createWaiterResponse(Either<T,Throwable> responseOrException, int attempts)booleanexceedsMaxWaitTime(long startTime, long nextDelayInMills)Optional<WaiterAcceptor<? super T>>firstWaiterAcceptorIfMatched(Either<T,Throwable> responseOrException)Either<Long,SdkClientException>nextDelayOrUnretryableException(int attemptNumber, long startTime)SdkClientExceptionnoneMatchException(Either<T,Throwable> responseOrException)SdkClientExceptionwaiterFailureException(WaiterAcceptor<? super T> acceptor)
-
-
-
Constructor Detail
-
WaiterExecutorHelper
public WaiterExecutorHelper(List<WaiterAcceptor<? super T>> waiterAcceptors, WaiterConfiguration configuration)
-
-
Method Detail
-
createWaiterResponse
public WaiterResponse<T> createWaiterResponse(Either<T,Throwable> responseOrException, int attempts)
-
firstWaiterAcceptorIfMatched
public Optional<WaiterAcceptor<? super T>> firstWaiterAcceptorIfMatched(Either<T,Throwable> responseOrException)
-
computeNextDelayInMills
public long computeNextDelayInMills(int attemptNumber)
-
exceedsMaxWaitTime
public boolean exceedsMaxWaitTime(long startTime, long nextDelayInMills)
-
nextDelayOrUnretryableException
public Either<Long,SdkClientException> nextDelayOrUnretryableException(int attemptNumber, long startTime)
-
noneMatchException
public SdkClientException noneMatchException(Either<T,Throwable> responseOrException)
-
waiterFailureException
public SdkClientException waiterFailureException(WaiterAcceptor<? super T> acceptor)
-
-