Class LimitedErrorCountRetryPolicy (2.12.0)

Implement a simple "count errors and then stop" retry policy.

Constructors

LimitedErrorCountRetryPolicy(int)

Parameter
NameDescription
maximum_failures int

Functions

virtual clone() const

Return a new copy of this object.

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


Returns
TypeDescription
std::unique_ptr< RPCRetryPolicy >

virtual Setup(grpc::ClientContext &) const

Update the ClientContext for the next call.

Parameter
NameDescription
context grpc::ClientContext &
Returns
TypeDescription
void

virtual OnFailure(Status const &)

Handle an RPC failure.

Parameter
NameDescription
status Status const &
Returns
TypeDescription
bool

true if the RPC operation should be retried.

virtual OnFailure(grpc::Status const &)

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

virtual IsExhausted() const

Returns
TypeDescription
bool

static IsPermanentFailure(Status const &)

Parameter
NameDescription
status Status const &
Returns
TypeDescription
bool

static IsPermanentFailure(grpc::Status const &)

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

Type Aliases

RetryableTraits

Alias Of: internal::SafeGrpcRetry