Send feedback
Class OperationTimedPollAlgorithm (2.34.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
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.
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
Send feedback
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 2023-09-25 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?