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>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
connection);
connection);
.
set<google::cloud::bigquery_analyticshub_v1::
AnalyticsHubServiceRetryPolicyOption>(
std::chrono::minutes(5))
.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);
}
};