Google Cloud Bigtable C++ Client  0.11.0
A C++ Client Library for Google Cloud Bigtable
Public Member Functions | List of all members
google::cloud::bigtable::v0::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 (google::cloud::Status const &status)=0
 Return the delay after an RPC operation has completed. More...
 
virtual std::chrono::milliseconds OnCompletion (grpc::Status const &s)=0
 

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.

Definition at line 44 of file rpc_backoff_policy.h.

Constructor & Destructor Documentation

◆ ~RPCBackoffPolicy()

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

Member Function Documentation

◆ clone()

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

◆ OnCompletion() [1/2]

virtual std::chrono::milliseconds google::cloud::bigtable::v0::RPCBackoffPolicy::OnCompletion ( google::cloud::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::v0::ExponentialBackoffPolicy.

◆ OnCompletion() [2/2]

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

◆ Setup()

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

Update the ClientContext for the next call.

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