Google Cloud Spanner C++ Client
A C++ Client Library for Google Cloud Spanner
|
Combine a RetryPolicy and a BackoffPolicy to create simple polling policies. More...
#include <google/cloud/spanner/polling_policy.h>
Public Member Functions | |
GenericPollingPolicy (Retry retry_policy, Backoff backoff_policy) | |
std::unique_ptr< PollingPolicy > | clone () const override |
Return a copy of the current policy. More... | |
bool | OnFailure (google::cloud::Status const &status) override |
A callback to indicate that a polling attempt failed. More... | |
std::chrono::milliseconds | WaitPeriod () override |
How long should the polling loop wait before trying again. More... | |
Combine a RetryPolicy and a BackoffPolicy to create simple polling policies.
Definition at line 81 of file polling_policy.h.
|
inline |
Definition at line 83 of file polling_policy.h.
|
inlineoverridevirtual |
Return a copy of the current policy.
This function is called at the beginning of the polling loop. Policies that are based on relative time should restart their timers when this function is called.
Implements google::cloud::spanner::v1::PollingPolicy.
Definition at line 88 of file polling_policy.h.
|
inlineoverridevirtual |
A callback to indicate that a polling attempt failed.
This is called when a polling request fails. Note that this callback is not invoked when the polling request succeeds with "operation not done".
Implements google::cloud::spanner::v1::PollingPolicy.
Definition at line 92 of file polling_policy.h.
|
inlineoverridevirtual |
How long should the polling loop wait before trying again.
Implements google::cloud::spanner::v1::PollingPolicy.
Definition at line 96 of file polling_policy.h.