Google Cloud Bigtable C++ Client  1.40.2
A C++ Client Library for Google Cloud Bigtable
Public Member Functions | List of all members
google::cloud::bigtable::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 Rep1 , typename Period1 , typename Rep2 , typename Period2 >
 ExponentialBackoffPolicy (std::chrono::duration< Rep1, Period1 > initial_delay, std::chrono::duration< Rep2, Period2 > 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 (Status const &status) override
 Return the delay after an RPC operation has completed. More...
 
std::chrono::milliseconds OnCompletion (grpc::Status const &status) override
 
std::chrono::milliseconds OnCompletion ()
 

Detailed Description

Implement a simple exponential backoff policy.

Definition at line 83 of file rpc_backoff_policy.h.

Constructor & Destructor Documentation

◆ ExponentialBackoffPolicy() [1/2]

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

◆ ExponentialBackoffPolicy() [2/2]

template<typename Rep1 , typename Period1 , typename Rep2 , typename Period2 >
google::cloud::bigtable::ExponentialBackoffPolicy::ExponentialBackoffPolicy ( std::chrono::duration< Rep1, Period1 >  initial_delay,
std::chrono::duration< Rep2, Period2 >  maximum_delay 
)
inline

Definition at line 88 of file rpc_backoff_policy.h.

Member Function Documentation

◆ clone()

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

◆ OnCompletion() [1/3]

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

Definition at line 73 of file rpc_backoff_policy.h.

◆ OnCompletion() [2/3]

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

◆ OnCompletion() [3/3]

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

◆ Setup()

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

Update the ClientContext for the next call.

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