Google Cloud Bigtable C++ Client 2.13.0
A C++ Client Library for Google Cloud Bigtable
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
google::cloud::bigtable::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 Types

using RetryableTraits = internal::SafeGrpcRetry
 

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 (Status const &status)=0
 Handle an RPC failure. More...
 
virtual bool OnFailure (grpc::Status const &status)=0
 
virtual bool IsExhausted () const
 

Static Public Member Functions

static bool IsPermanentFailure (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.

Member Typedef Documentation

◆ RetryableTraits

Constructor & Destructor Documentation

◆ ~RPCRetryPolicy()

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

Member Function Documentation

◆ clone()

virtual std::unique_ptr< RPCRetryPolicy > google::cloud::bigtable::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::LimitedErrorCountRetryPolicy, and google::cloud::bigtable::LimitedTimeRetryPolicy.

◆ IsExhausted()

virtual bool google::cloud::bigtable::RPCRetryPolicy::IsExhausted ( ) const
inlinevirtual

◆ IsPermanentFailure() [1/2]

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

◆ IsPermanentFailure() [2/2]

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

◆ OnFailure() [1/2]

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

◆ OnFailure() [2/2]

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

Handle an RPC failure.

Returns
true if the RPC operation should be retried.

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

◆ Setup()

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

Update the ClientContext for the next call.

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