Google Cloud Bigtable C++ Client  0.11.0
A C++ Client Library for Google Cloud Bigtable
Public Member Functions | Static Public Member Functions | List of all members
google::cloud::bigtable::v0::RPCRetryPolicy Class Referenceabstract

Define the interface for controlling how the Bigtable client retries RPC operations. More...

#include <google/cloud/bigtable/rpc_retry_policy.h>

Public Member Functions

virtual ~RPCRetryPolicy ()=default
 
virtual std::unique_ptr< RPCRetryPolicyclone () const =0
 Return a new copy of this object. More...
 
virtual void Setup (grpc::ClientContext &context) const =0
 Update the ClientContext for the next call. More...
 
virtual bool OnFailure (google::cloud::Status const &status)=0
 Handle an RPC failure. More...
 
virtual bool OnFailure (grpc::Status const &status)=0
 

Static Public Member Functions

static bool IsPermanentFailure (google::cloud::Status const &status)
 
static bool IsPermanentFailure (grpc::Status const &status)
 

Detailed Description

Define the interface for controlling how the Bigtable client retries RPC operations.

The C++ client for Bigtable needs to hide partial and temporary failures from the application. However, we need to give the users enough flexibility to control how many attempts are made to reissue operations, how often these attempts are executed, and how to signal that an error has occurred.

The application provides an instance of this class when the Table (or TableAdmin) object is created. This instance serves as a prototype to create new RPCRetryPolicy objects of the same (dynamic) type and with the same initial state.

Definition at line 82 of file rpc_retry_policy.h.

Constructor & Destructor Documentation

◆ ~RPCRetryPolicy()

virtual google::cloud::bigtable::v0::RPCRetryPolicy::~RPCRetryPolicy ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr<RPCRetryPolicy> google::cloud::bigtable::v0::RPCRetryPolicy::clone ( ) const
pure virtual

Return a new copy of this object.

Typically implemented as

return std::unique_ptr<RPCRetryPolicy>(new Foo(*this));

Implemented in google::cloud::bigtable::v0::LimitedTimeRetryPolicy, and google::cloud::bigtable::v0::LimitedErrorCountRetryPolicy.

◆ IsPermanentFailure() [1/2]

static bool google::cloud::bigtable::v0::RPCRetryPolicy::IsPermanentFailure ( google::cloud::Status const &  status)
inlinestatic

Definition at line 110 of file rpc_retry_policy.h.

◆ IsPermanentFailure() [2/2]

static bool google::cloud::bigtable::v0::RPCRetryPolicy::IsPermanentFailure ( grpc::Status const &  status)
inlinestatic

Definition at line 114 of file rpc_retry_policy.h.

◆ OnFailure() [1/2]

virtual bool google::cloud::bigtable::v0::RPCRetryPolicy::OnFailure ( google::cloud::Status const &  status)
pure virtual

Handle an RPC failure.

Returns
true if the RPC operation should be retried.

Implemented in google::cloud::bigtable::v0::LimitedTimeRetryPolicy, and google::cloud::bigtable::v0::LimitedErrorCountRetryPolicy.

◆ OnFailure() [2/2]

virtual bool google::cloud::bigtable::v0::RPCRetryPolicy::OnFailure ( grpc::Status const &  status)
pure virtual

◆ Setup()

virtual void google::cloud::bigtable::v0::RPCRetryPolicy::Setup ( grpc::ClientContext &  context) const
pure virtual