Google Cloud Bigtable C++ Client
2.1.0
A C++ Client Library for Google Cloud Bigtable
|
Construct a polling policy from existing Retry and Backoff policies. More...
#include <google/cloud/bigtable/polling_policy.h>
Public Member Functions | |
GenericPollingPolicy (internal::RPCPolicyParameters defaults) | |
GenericPollingPolicy (Retry retry, Backoff backoff) | |
std::unique_ptr< PollingPolicy > | clone () const override |
Return a new copy of this object. More... | |
void | Setup (grpc::ClientContext &context) override |
bool | IsPermanentError (Status const &status) override |
Return true if status represents a permanent error that cannot be retried. More... | |
bool | OnFailure (Status const &status) override |
Handle an RPC failure. More... | |
bool | Exhausted () override |
Return true if we cannot try again. More... | |
std::chrono::milliseconds | WaitPeriod () override |
Return for how long we should wait before trying again. More... | |
virtual bool | IsPermanentError (grpc::Status const &status) |
Return true if status represents a permanent error that cannot be retried. More... | |
virtual bool | OnFailure (grpc::Status const &status) |
Handle an RPC failure. More... | |
Construct a polling policy from existing Retry and Backoff policies.
A polling policy can be built by composing a retry and backoff policy. For example, to create a polling policy that "retries N times, waiting a fixed period between retries" you could compose the "try N times" retry policy with the "wait a fixed period between retries".
This class makes it easier to create such composed polling policies.
Retry | the RPC retry strategy used to limit the number or the total duration of the polling strategy. |
Backoff | the RPC backoff strategy used to control how often the library polls. |
Definition at line 110 of file polling_policy.h.
|
inlineexplicit |
Definition at line 117 of file polling_policy.h.
|
inline |
Definition at line 122 of file polling_policy.h.
|
inlineoverridevirtual |
Return a new copy of this object.
Typically implemented as
Implements google::cloud::bigtable::PollingPolicy.
Definition at line 128 of file polling_policy.h.
|
inlineoverridevirtual |
Return true if we cannot try again.
Implements google::cloud::bigtable::PollingPolicy.
Definition at line 147 of file polling_policy.h.
|
inlinevirtualinherited |
Return true if status
represents a permanent error that cannot be retried.
TODO(#2344): remove grpc::Status
version.
Definition at line 55 of file polling_policy.h.
|
inlineoverridevirtual |
Return true if status
represents a permanent error that cannot be retried.
Implements google::cloud::bigtable::PollingPolicy.
Definition at line 139 of file polling_policy.h.
|
inlinevirtualinherited |
Handle an RPC failure.
TODO(#2344): remove grpc::Status
version.
Definition at line 71 of file polling_policy.h.
|
inlineoverridevirtual |
Handle an RPC failure.
Implements google::cloud::bigtable::PollingPolicy.
Definition at line 143 of file polling_policy.h.
|
inlineoverridevirtual |
Implements google::cloud::bigtable::PollingPolicy.
Definition at line 134 of file polling_policy.h.
|
inlineoverridevirtual |
Return for how long we should wait before trying again.
Implements google::cloud::bigtable::PollingPolicy.
Definition at line 149 of file polling_policy.h.