Google Cloud Bigtable C++ Client  2.7.0
A C++ Client Library for Google Cloud Bigtable
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.

Definition at line 133 of file rpc_retry_policy.h.

Member Typedef Documentation

◆ RetryableTraits

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

Definition at line 81 of file rpc_retry_policy.h.

Constructor & Destructor Documentation

◆ LimitedErrorCountRetryPolicy()

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

Definition at line 135 of file rpc_retry_policy.h.

Member Function Documentation

◆ clone()

std::unique_ptr<RPCRetryPolicy> google::cloud::bigtable::LimitedErrorCountRetryPolicy::clone ( ) const

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

◆ IsPermanentFailure() [1/2]

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

Definition at line 113 of file rpc_retry_policy.h.

◆ IsPermanentFailure() [2/2]

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

Definition at line 109 of file rpc_retry_policy.h.

◆ OnFailure() [1/2]

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

◆ OnFailure() [2/2]

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

Handle an RPC failure.

true if the RPC operation should be retried.

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

◆ Setup()

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

Update the ClientContext for the next call.

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