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::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.

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

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

◆ 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.