Class PollingPolicy (2.31.0)

Define the interface for providing asynchronous repetitive call rules.

Functions

clone() const

Return a new copy of this object.

Typically implemented as

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

Setup(grpc::ClientContext &)

Parameter
Name Description
context grpc::ClientContext &
Returns
Type Description
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
Name Description
status grpc::Status const &
Returns
Type Description
bool

IsPermanentError(Status const &)

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

Parameter
Name Description
status Status const &
Returns
Type Description
bool

virtual OnFailure(grpc::Status const &)

Handle an RPC failure.

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

Parameter
Name Description
status grpc::Status const &
Returns
Type Description
bool

true if the RPC operation should be retried.

OnFailure(Status const &)

Handle an RPC failure.

Parameter
Name Description
status Status const &
Returns
Type Description
bool

true if the RPC operation should be retried.

Exhausted()

Return true if we cannot try again.

Returns
Type Description
bool

WaitPeriod()

Return for how long we should wait before trying again.

Returns
Type Description
std::chrono::milliseconds