Class OperationTimedPollAlgorithm (2.70.3)
public class OperationTimedPollAlgorithm extends ExponentialRetryAlgorithm
Operation timed polling algorithm, which uses exponential backoff factor for determining when the
next polling operation should be executed. If the polling exceeds the total timeout this
algorithm cancels polling.
Static Methods
create(RetrySettings globalSettings)
public static OperationTimedPollAlgorithm create(RetrySettings globalSettings)
Creates the polling algorithm, using the default NanoClock
for time computations.
Parameter |
Name |
Description |
globalSettings |
RetrySettings
the settings
|
create(RetrySettings globalSettings, ApiClock clock)
public static OperationTimedPollAlgorithm create(RetrySettings globalSettings, ApiClock clock)
Methods
shouldRPCTerminate(long timeLeftMs)
protected boolean shouldRPCTerminate(long timeLeftMs)
Parameter |
Name |
Description |
timeLeftMs |
long
|
Overrides
shouldRetry(TimedAttemptSettings nextAttemptSettings)
public boolean shouldRetry(TimedAttemptSettings nextAttemptSettings)
Parameter |
Name |
Description |
nextAttemptSettings |
TimedAttemptSettings
attempt settings, which will be used for the next attempt, if
accepted
|
Returns |
Type |
Description |
boolean |
true if more attempts should be made, never returns false (throws
CancellationException instead)
|
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-10 UTC."],[],[]]