This shows how to override the retry policies for bigquery_reservation_v1::ReservationServiceClient:
auto options =
.
set<google::cloud::bigquery_reservation_v1::
ReservationServiceConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
ReservationServiceRetryPolicyOption>(
ReservationServiceLimitedErrorCountRetryPolicy(3)
.clone())
ReservationServiceBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
auto connection =
options);
connection);
connection);
.
set<google::cloud::bigquery_reservation_v1::
ReservationServiceRetryPolicyOption>(
std::chrono::minutes(5))
.clone()));
Options & set(ValueTypeT< T > v)
This API allows users to manage their BigQuery reservations.
Definition: reservation_client.h:75
Definition: reservation_client.h:32
::google::cloud::internal::LimitedTimeRetryPolicy< bigquery_reservation_v1_internal::ReservationServiceRetryTraits > ReservationServiceLimitedTimeRetryPolicy
Definition: reservation_connection.h:43
std::shared_ptr< ReservationServiceConnection > MakeReservationServiceConnection(Options options={})
A factory function to construct an object of type ReservationServiceConnection.
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
class CustomIdempotencyPolicy
ReservationServiceConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::bigquery_reservation_v1::
ReservationServiceConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};