Google Cloud Bigtable C++ Client  0.11.0
A C++ Client Library for Google Cloud Bigtable
Public Member Functions | Static Public Member Functions | List of all members
google::cloud::bigtable::v0::LimitedTimeRetryPolicy Class Reference

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

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

Public Member Functions

 LimitedTimeRetryPolicy (internal::RPCPolicyParameters defaults)
 
template<typename duration_t >
 LimitedTimeRetryPolicy (duration_t 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 (google::cloud::Status const &status) override
 Handle an RPC failure. More...
 
bool OnFailure (grpc::Status const &status) override
 

Static Public Member Functions

static bool IsPermanentFailure (google::cloud::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 146 of file rpc_retry_policy.h.

Constructor & Destructor Documentation

◆ LimitedTimeRetryPolicy() [1/2]

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

Definition at line 45 of file rpc_retry_policy.cc.

◆ LimitedTimeRetryPolicy() [2/2]

template<typename duration_t >
google::cloud::bigtable::v0::LimitedTimeRetryPolicy::LimitedTimeRetryPolicy ( duration_t  maximum_duration)
inlineexplicit

Definition at line 150 of file rpc_retry_policy.h.

Member Function Documentation

◆ clone()

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

Definition at line 49 of file rpc_retry_policy.cc.

◆ IsPermanentFailure() [1/2]

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

Definition at line 110 of file rpc_retry_policy.h.

◆ IsPermanentFailure() [2/2]

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

Definition at line 114 of file rpc_retry_policy.h.

◆ OnFailure() [1/2]

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

Handle an RPC failure.

Returns
true if the RPC operation should be retried.

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

Definition at line 59 of file rpc_retry_policy.cc.

◆ OnFailure() [2/2]

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

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

Definition at line 63 of file rpc_retry_policy.cc.

◆ Setup()

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

Update the ClientContext for the next call.

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

Definition at line 53 of file rpc_retry_policy.cc.