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 until
OperationSnapshot.isDone() is
true.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNextAttempt(Throwable prevThrowable, OperationSnapshot prevResponse, TimedAttemptSettings prevSettings) booleanshouldRetry(Throwable prevThrowable, OperationSnapshot prevResponse) Same asResultRetryAlgorithm.shouldRetry(Throwable, Object), but without aRetryingContext.
-
Constructor Details
-
OperationResponsePollAlgorithm
public OperationResponsePollAlgorithm()
-
-
Method Details
-
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
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>
-