Class RPCBackoffPolicy (2.21.0)

Define the interface for controlling how the Bigtable client backsoff from failed RPC operations.

The C++ client for Bigtable needs to hide partial and temporary failures from the application. However, we need to give the users enough flexibility to control how many attempts are made to reissue operations, how often these attempts are executed, and how to signal that an error has occurred.

The application provides an instance of this class when the Table (or TableAdmin) object is created. This instance serves as a prototype to create new RPCBackoffPolicy objects of the same (dynamic) type and with the same initial state.

Functions

clone() const

Return a new copy of this object.

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


Returns
TypeDescription
std::unique_ptr< RPCBackoffPolicy >

Setup(grpc::ClientContext &) const

Update the ClientContext for the next call.

Parameter
NameDescription
context grpc::ClientContext &
Returns
TypeDescription
void

OnCompletion(Status const &)

Return the delay after an RPC operation has completed.

Parameter
NameDescription
status Status const &

the status returned by the last RPC operation.

Returns
TypeDescription
std::chrono::milliseconds

true the delay before trying the operation again.

OnCompletion(grpc::Status const &)

Parameter
NameDescription
s grpc::Status const &
Returns
TypeDescription
std::chrono::milliseconds

OnCompletion()

Returns
TypeDescription
std::chrono::milliseconds