Class WaiterExecutorHelper<T>
- java.lang.Object
-
- software.amazon.awssdk.core.internal.waiters.WaiterExecutorHelper<T>
-
public final class WaiterExecutorHelper<T> extends Object
The waiter executor helper class. Contains the logic shared byWaiterExecutor
andAsyncWaiterExecutor
-
-
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 long
computeNextDelayInMills(int attemptNumber)
WaiterResponse<T>
createWaiterResponse(Either<T,Throwable> responseOrException, int attempts)
boolean
exceedsMaxWaitTime(long startTime, long nextDelayInMills)
Optional<WaiterAcceptor<? super T>>
firstWaiterAcceptorIfMatched(Either<T,Throwable> responseOrException)
Either<Long,SdkClientException>
nextDelayOrUnretryableException(int attemptNumber, long startTime)
SdkClientException
noneMatchException(Either<T,Throwable> responseOrException)
SdkClientException
waiterFailureException(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)
-
-