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

Define the interface for providing asynchronous repetitive call rules. More...

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

Public Member Functions

virtual ~PollingPolicy ()=default
 
virtual std::unique_ptr< PollingPolicyclone ()=0
 Return a new copy of this object. More...
 
virtual void Setup (grpc::ClientContext &context)=0
 
virtual bool IsPermanentError (grpc::Status const &status)
 Return true if status represents a permanent error that cannot be retried. More...
 
virtual bool IsPermanentError (google::cloud::Status const &status)=0
 Return true if status represents a permanent error that cannot be retried. More...
 
virtual bool OnFailure (grpc::Status const &status)
 Handle an RPC failure. More...
 
virtual bool OnFailure (google::cloud::Status const &status)=0
 Handle an RPC failure. More...
 
virtual bool Exhausted ()=0
 Return true if we cannot try again. More...
 
virtual std::chrono::milliseconds WaitPeriod ()=0
 Return for how long we should wait before trying again. More...
 

Detailed Description

Define the interface for providing asynchronous repetitive call rules.

Definition at line 32 of file polling_policy.h.

Constructor & Destructor Documentation

◆ ~PollingPolicy()

virtual google::cloud::bigtable::v0::PollingPolicy::~PollingPolicy ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr<PollingPolicy> google::cloud::bigtable::v0::PollingPolicy::clone ( )
pure virtual

Return a new copy of this object.

Typically implemented as

return std::unique_ptr<PollingPolicy>(new Foo(*this));

Implemented in google::cloud::bigtable::v0::GenericPollingPolicy< Retry, Backoff >.

◆ Exhausted()

virtual bool google::cloud::bigtable::v0::PollingPolicy::Exhausted ( )
pure virtual

Return true if we cannot try again.

Implemented in google::cloud::bigtable::v0::GenericPollingPolicy< Retry, Backoff >.

◆ IsPermanentError() [1/2]

virtual bool google::cloud::bigtable::v0::PollingPolicy::IsPermanentError ( grpc::Status const &  status)
inlinevirtual

Return true if status represents a permanent error that cannot be retried.

TODO(#2344): remove grpc::Status version.

Definition at line 53 of file polling_policy.h.

◆ IsPermanentError() [2/2]

virtual bool google::cloud::bigtable::v0::PollingPolicy::IsPermanentError ( google::cloud::Status const &  status)
pure virtual

Return true if status represents a permanent error that cannot be retried.

Implemented in google::cloud::bigtable::v0::GenericPollingPolicy< Retry, Backoff >.

◆ OnFailure() [1/2]

virtual bool google::cloud::bigtable::v0::PollingPolicy::OnFailure ( grpc::Status const &  status)
inlinevirtual

Handle an RPC failure.

TODO(#2344): remove grpc::Status version.

Returns
true if the RPC operation should be retried.

Definition at line 69 of file polling_policy.h.

◆ OnFailure() [2/2]

virtual bool google::cloud::bigtable::v0::PollingPolicy::OnFailure ( google::cloud::Status const &  status)
pure virtual

Handle an RPC failure.

Returns
true if the RPC operation should be retried.

Implemented in google::cloud::bigtable::v0::GenericPollingPolicy< Retry, Backoff >.

◆ Setup()

virtual void google::cloud::bigtable::v0::PollingPolicy::Setup ( grpc::ClientContext &  context)
pure virtual

◆ WaitPeriod()

virtual std::chrono::milliseconds google::cloud::bigtable::v0::PollingPolicy::WaitPeriod ( )
pure virtual

Return for how long we should wait before trying again.

Implemented in google::cloud::bigtable::v0::GenericPollingPolicy< Retry, Backoff >.