Package com.google.api.gax.longrunning
Class OperationResponsePollAlgorithm
- java.lang.Object
-
- com.google.api.gax.longrunning.OperationResponsePollAlgorithm
-
- All Implemented Interfaces:
ResultRetryAlgorithm<OperationSnapshot>
public class OperationResponsePollAlgorithm extends Object implements ResultRetryAlgorithm<OperationSnapshot>
Operation polling algorithm, which keeps retrying untilOperationSnapshot.isDone()is true.
-
-
Constructor Summary
Constructors Constructor Description OperationResponsePollAlgorithm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimedAttemptSettingscreateNextAttempt(Throwable prevThrowable, OperationSnapshot prevResponse, TimedAttemptSettings prevSettings)booleanshouldRetry(Throwable prevThrowable, OperationSnapshot prevResponse)Same asResultRetryAlgorithm.shouldRetry(Throwable, Object), but without aRetryingContext.
-
-
-
Method Detail
-
createNextAttempt
public TimedAttemptSettings createNextAttempt(Throwable prevThrowable, OperationSnapshot prevResponse, TimedAttemptSettings prevSettings)
Description copied from interface:ResultRetryAlgorithmSame asResultRetryAlgorithmWithContext.createNextAttempt(RetryingContext, Throwable, Object, TimedAttemptSettings), but without aRetryingContext.Use
ResultRetryAlgorithmWithContext.createNextAttempt(RetryingContext, Throwable, Object, TimedAttemptSettings)instead of this method when possible.- Specified by:
createNextAttemptin interfaceResultRetryAlgorithm<OperationSnapshot>
-
shouldRetry
public boolean shouldRetry(Throwable prevThrowable, OperationSnapshot prevResponse)
Description copied from interface:ResultRetryAlgorithmSame asResultRetryAlgorithm.shouldRetry(Throwable, Object), but without aRetryingContext.Use
ResultRetryAlgorithmWithContext.shouldRetry(RetryingContext, Throwable, Object)instead of this method when possible.- Specified by:
shouldRetryin interfaceResultRetryAlgorithm<OperationSnapshot>
-
-