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::ExponentialBackoffPolicy Class Reference

Implement a simple exponential backoff policy. More...

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

Public Member Functions

 ExponentialBackoffPolicy (internal::RPCPolicyParameters defaults)
 
template<typename duration_t1 , typename duration_t2 >
 ExponentialBackoffPolicy (duration_t1 initial_delay, duration_t2 maximum_delay)
 
std::unique_ptr< RPCBackoffPolicyclone () const override
 Return a new copy of this object. More...
 
void Setup (grpc::ClientContext &context) const override
 Update the ClientContext for the next call. More...
 
std::chrono::milliseconds OnCompletion (google::cloud::Status const &status) override
 Return the delay after an RPC operation has completed. More...
 
std::chrono::milliseconds OnCompletion (grpc::Status const &status) override
 

Detailed Description

Implement a simple exponential backoff policy.

Definition at line 82 of file rpc_backoff_policy.h.

Constructor & Destructor Documentation

◆ ExponentialBackoffPolicy() [1/2]

google::cloud::bigtable::v0::ExponentialBackoffPolicy::ExponentialBackoffPolicy ( internal::RPCPolicyParameters  defaults)

Definition at line 27 of file rpc_backoff_policy.cc.

◆ ExponentialBackoffPolicy() [2/2]

template<typename duration_t1 , typename duration_t2 >
google::cloud::bigtable::v0::ExponentialBackoffPolicy::ExponentialBackoffPolicy ( duration_t1  initial_delay,
duration_t2  maximum_delay 
)
inline

Definition at line 86 of file rpc_backoff_policy.h.

Member Function Documentation

◆ clone()

std::unique_ptr< RPCBackoffPolicy > google::cloud::bigtable::v0::ExponentialBackoffPolicy::clone ( ) const
overridevirtual

Return a new copy of this object.

Typically implemented as

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

Implements google::cloud::bigtable::v0::RPCBackoffPolicy.

Definition at line 32 of file rpc_backoff_policy.cc.

◆ OnCompletion() [1/2]

std::chrono::milliseconds google::cloud::bigtable::v0::ExponentialBackoffPolicy::OnCompletion ( google::cloud::Status const &  status)
overridevirtual

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.

Implements google::cloud::bigtable::v0::RPCBackoffPolicy.

Definition at line 38 of file rpc_backoff_policy.cc.

◆ OnCompletion() [2/2]

std::chrono::milliseconds google::cloud::bigtable::v0::ExponentialBackoffPolicy::OnCompletion ( grpc::Status const &  status)
overridevirtual

◆ Setup()

void google::cloud::bigtable::v0::ExponentialBackoffPolicy::Setup ( grpc::ClientContext &  context) const
overridevirtual

Update the ClientContext for the next call.

Implements google::cloud::bigtable::v0::RPCBackoffPolicy.

Definition at line 36 of file rpc_backoff_policy.cc.