Google Cloud BigQuery C++ Client 2.13.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
Override bigquery_analyticshub_v1::AnalyticsHubServiceClient Retry Policies

This shows how to override the retry policies for bigquery_analyticshub_v1::AnalyticsHubServiceClient:

auto options =
.set<google::cloud::bigquery_analyticshub_v1::
AnalyticsHubServiceConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
AnalyticsHubServiceRetryPolicyOption>(
AnalyticsHubServiceLimitedErrorCountRetryPolicy(3)
.clone())
AnalyticsHubServiceBackoffPolicyOption>(
/*initial_delay=*/std::chrono::milliseconds(200),
/*maximum_delay=*/std::chrono::seconds(45),
/*scaling=*/2.0)
.clone());
// c1 and c2 share the same retry policies
connection);
connection);
// You can override any of the policies in a new client. This new client
// will share the policies from c1 (or c2) *except* from the retry policy.
connection, google::cloud::Options{}
.set<google::cloud::bigquery_analyticshub_v1::
AnalyticsHubServiceRetryPolicyOption>(
std::chrono::minutes(5))
.clone()));
// You can also override the policies in a single call:
// c3.SomeRpc(..., google::cloud::Options{}
// .set<google::cloud::bigquery_analyticshub_v1::AnalyticsHubServiceRetryPolicyOption>(
// google::cloud::bigquery_analyticshub_v1::AnalyticsHubServiceLimitedErrorCountRetryPolicy(10).clone()));
Options & set(ValueTypeT< T > v)
The AnalyticsHubService API facilitates data sharing within and across organizations.
Definition: analytics_hub_client.h:66
Definition: analytics_hub_client.h:32
std::shared_ptr< AnalyticsHubServiceConnection > MakeAnalyticsHubServiceConnection(Options options={})
A factory function to construct an object of type AnalyticsHubServiceConnection.
::google::cloud::internal::LimitedTimeRetryPolicy< bigquery_analyticshub_v1_internal::AnalyticsHubServiceRetryTraits > AnalyticsHubServiceLimitedTimeRetryPolicy
Definition: analytics_hub_connection.h:43
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy

Assuming you have created a custom idempotency policy. Such as:

class CustomIdempotencyPolicy
AnalyticsHubServiceConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::bigquery_analyticshub_v1::
AnalyticsHubServiceConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
// Override inherited functions to define as needed.
};