This shows how to override the retry policies for bigquery_datatransfer_v1::DataTransferServiceClient:
auto options =
.
set<google::cloud::bigquery_datatransfer_v1::
DataTransferServiceConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
DataTransferServiceRetryPolicyOption>(
DataTransferServiceLimitedErrorCountRetryPolicy(3)
.clone())
DataTransferServiceBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
connection);
connection);
.
set<google::cloud::bigquery_datatransfer_v1::
DataTransferServiceRetryPolicyOption>(
std::chrono::minutes(5))
.clone()));
Options & set(ValueTypeT< T > v)
This API allows users to manage their data transfers into BigQuery.
Definition: data_transfer_client.h:61
Definition: data_transfer_client.h:32
std::shared_ptr< DataTransferServiceConnection > MakeDataTransferServiceConnection(Options options={})
A factory function to construct an object of type DataTransferServiceConnection.
::google::cloud::internal::LimitedTimeRetryPolicy< bigquery_datatransfer_v1_internal::DataTransferServiceRetryTraits > DataTransferServiceLimitedTimeRetryPolicy
Definition: data_transfer_connection.h:43
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
class CustomIdempotencyPolicy
DataTransferServiceConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::bigquery_datatransfer_v1::
DataTransferServiceConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};