Class OperationResponsePollAlgorithm (2.21.0)

public class OperationResponsePollAlgorithm implements ResultRetryAlgorithm<OperationSnapshot>

Operation polling algorithm, which keeps retrying until OperationSnapshot#isDone() is true.

Inheritance

java.lang.Object > OperationResponsePollAlgorithm

Implements

com.google.api.gax.retrying.ResultRetryAlgorithm<com.google.api.gax.longrunning.OperationSnapshot>

Constructors

OperationResponsePollAlgorithm()

public OperationResponsePollAlgorithm()

Methods

createNextAttempt(Throwable prevThrowable, OperationSnapshot prevResponse, TimedAttemptSettings prevSettings)

public TimedAttemptSettings createNextAttempt(Throwable prevThrowable, OperationSnapshot prevResponse, TimedAttemptSettings prevSettings)
Parameters
NameDescription
prevThrowableThrowable
prevResponseOperationSnapshot
prevSettingsTimedAttemptSettings
Returns
TypeDescription
TimedAttemptSettings

shouldRetry(Throwable prevThrowable, OperationSnapshot prevResponse)

public boolean shouldRetry(Throwable prevThrowable, OperationSnapshot prevResponse)
Parameters
NameDescription
prevThrowableThrowable
prevResponseOperationSnapshot
Returns
TypeDescription
boolean