Google Cloud Bigtable C++ Client 2.13.0
A C++ Client Library for Google Cloud Bigtable
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::bigtable::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 () const =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 (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 (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.

Constructor & Destructor Documentation

◆ ~PollingPolicy()

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

Member Function Documentation

◆ clone()

virtual std::unique_ptr< PollingPolicy > google::cloud::bigtable::PollingPolicy::clone ( ) const
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::GenericPollingPolicy< Retry, Backoff >.

◆ Exhausted()

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

Return true if we cannot try again.

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

◆ IsPermanentError() [1/2]

virtual bool google::cloud::bigtable::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.

◆ IsPermanentError() [2/2]

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

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

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

◆ OnFailure() [1/2]

virtual bool google::cloud::bigtable::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.

◆ OnFailure() [2/2]

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

Handle an RPC failure.

Returns
true if the RPC operation should be retried.

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

◆ Setup()

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

◆ WaitPeriod()

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

Return for how long we should wait before trying again.

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