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

Implement a simple "count errors and then stop" retry policy. More...

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

Public Types

using RetryableTraits = internal::SafeGrpcRetry
 

Public Member Functions

 LimitedErrorCountRetryPolicy (int maximum_failures)
 
std::unique_ptr< RPCRetryPolicyclone () 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...
 
bool OnFailure (Status const &status) override
 Handle an RPC failure. More...
 
bool OnFailure (grpc::Status const &status) override
 
bool IsExhausted () const override
 

Static Public Member Functions

static bool IsPermanentFailure (Status const &status)
 
static bool IsPermanentFailure (grpc::Status const &status)
 

Detailed Description

Implement a simple "count errors and then stop" retry policy.

Member Typedef Documentation

◆ RetryableTraits

using google::cloud::bigtable::RPCRetryPolicy::RetryableTraits = internal::SafeGrpcRetry
inherited

Constructor & Destructor Documentation

◆ LimitedErrorCountRetryPolicy()

google::cloud::bigtable::LimitedErrorCountRetryPolicy::LimitedErrorCountRetryPolicy ( int  maximum_failures)
inlineexplicit

Member Function Documentation

◆ clone()

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

◆ IsExhausted()

bool google::cloud::bigtable::LimitedErrorCountRetryPolicy::IsExhausted ( ) const
overridevirtual

◆ IsPermanentFailure() [1/2]

static bool google::cloud::bigtable::RPCRetryPolicy::IsPermanentFailure ( grpc::Status const &  status)
inlinestaticinherited

◆ IsPermanentFailure() [2/2]

static bool google::cloud::bigtable::RPCRetryPolicy::IsPermanentFailure ( Status const &  status)
inlinestaticinherited

◆ OnFailure() [1/2]

bool google::cloud::bigtable::LimitedErrorCountRetryPolicy::OnFailure ( grpc::Status const &  status)
overridevirtual

◆ OnFailure() [2/2]

bool google::cloud::bigtable::LimitedErrorCountRetryPolicy::OnFailure ( Status const &  status)
overridevirtual

Handle an RPC failure.

Returns
true if the RPC operation should be retried.

Implements google::cloud::bigtable::RPCRetryPolicy.

◆ Setup()

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

Update the ClientContext for the next call.

Implements google::cloud::bigtable::RPCRetryPolicy.