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

Implement a simple "keep trying for this time" retry policy. More...

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

Public Types

using RetryableTraits = internal::SafeGrpcRetry

Public Member Functions

 LimitedTimeRetryPolicy (internal::RPCPolicyParameters defaults)
template<typename DurationT >
 LimitedTimeRetryPolicy (DurationT maximum_duration)
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 "keep trying for this time" retry policy.

Definition at line 154 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

◆ LimitedTimeRetryPolicy() [1/2]

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

◆ LimitedTimeRetryPolicy() [2/2]

template<typename DurationT >
google::cloud::bigtable::LimitedTimeRetryPolicy::LimitedTimeRetryPolicy ( DurationT  maximum_duration)

Definition at line 158 of file rpc_retry_policy.h.

Member Function Documentation

◆ clone()

std::unique_ptr<RPCRetryPolicy> google::cloud::bigtable::LimitedTimeRetryPolicy::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::LimitedTimeRetryPolicy::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::LimitedTimeRetryPolicy::OnFailure ( grpc::Status const &  status)

◆ OnFailure() [2/2]

bool google::cloud::bigtable::LimitedTimeRetryPolicy::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::LimitedTimeRetryPolicy::Setup ( grpc::ClientContext &  context) const

Update the ClientContext for the next call.

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