Class PollingPolicy (2.12.0)

Define the interface for providing asynchronous repetitive call rules.

Functions

clone() const

Return a new copy of this object.

Typically implemented as ```cpp return std::unique_ptr


Returns
TypeDescription
std::unique_ptr< PollingPolicy >

Setup(grpc::ClientContext &)

Parameter
NameDescription
context grpc::ClientContext &
Returns
TypeDescription
void

virtual IsPermanentError(grpc::Status const &)

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

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

Parameter
NameDescription
status grpc::Status const &
Returns
TypeDescription
bool

IsPermanentError(Status const &)

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

Parameter
NameDescription
status Status const &
Returns
TypeDescription
bool

virtual OnFailure(grpc::Status const &)

Handle an RPC failure.

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

Parameter
NameDescription
status grpc::Status const &
Returns
TypeDescription
bool

true if the RPC operation should be retried.

OnFailure(Status const &)

Handle an RPC failure.

Parameter
NameDescription
status Status const &
Returns
TypeDescription
bool

true if the RPC operation should be retried.

Exhausted()

Return true if we cannot try again.

Returns
TypeDescription
bool

WaitPeriod()

Return for how long we should wait before trying again.

Returns
TypeDescription
std::chrono::milliseconds