Class OperationResponsePollAlgorithm (2.57.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
Name Description
prevThrowable Throwable
prevResponse OperationSnapshot
prevSettings TimedAttemptSettings
Returns
Type Description
TimedAttemptSettings

shouldRetry(Throwable prevThrowable, OperationSnapshot prevResponse)

public boolean shouldRetry(Throwable prevThrowable, OperationSnapshot prevResponse)
Parameters
Name Description
prevThrowable Throwable
prevResponse OperationSnapshot
Returns
Type Description
boolean