Google Cloud Bigtable C++ Client 2.13.0
A C++ Client Library for Google Cloud Bigtable
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::bigtable::RPCBackoffPolicy Class Referenceabstract

Define the interface for controlling how the Bigtable client backsoff from failed RPC operations. More...

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

Public Member Functions

virtual ~RPCBackoffPolicy ()=default
 
virtual std::unique_ptr< RPCBackoffPolicyclone () 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 std::chrono::milliseconds OnCompletion (Status const &status)=0
 Return the delay after an RPC operation has completed. More...
 
virtual std::chrono::milliseconds OnCompletion (grpc::Status const &s)=0
 
std::chrono::milliseconds OnCompletion ()
 

Detailed Description

Define the interface for controlling how the Bigtable client backsoff from failed 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 RPCBackoffPolicy objects of the same (dynamic) type and with the same initial state.

Constructor & Destructor Documentation

◆ ~RPCBackoffPolicy()

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

Member Function Documentation

◆ clone()

virtual std::unique_ptr< RPCBackoffPolicy > google::cloud::bigtable::RPCBackoffPolicy::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::ExponentialBackoffPolicy.

◆ OnCompletion() [1/3]

std::chrono::milliseconds google::cloud::bigtable::RPCBackoffPolicy::OnCompletion ( )
inline

◆ OnCompletion() [2/3]

virtual std::chrono::milliseconds google::cloud::bigtable::RPCBackoffPolicy::OnCompletion ( grpc::Status const &  s)
pure virtual

◆ OnCompletion() [3/3]

virtual std::chrono::milliseconds google::cloud::bigtable::RPCBackoffPolicy::OnCompletion ( Status const &  status)
pure virtual

Return the delay after an RPC operation has completed.

Returns
true the delay before trying the operation again.
Parameters
statusthe status returned by the last RPC operation.

Implemented in google::cloud::bigtable::ExponentialBackoffPolicy.

◆ Setup()

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

Update the ClientContext for the next call.

Implemented in google::cloud::bigtable::ExponentialBackoffPolicy.