Package org.apache.beam.sdk.io.googleads
Interface GoogleAdsIO.RateLimitPolicy<GoogleAdsErrorT>
- All Known Implementing Classes:
GoogleAdsV19.SimpleRateLimitPolicy
- Enclosing class:
GoogleAdsIO<GoogleAdsRowT,
SearchGoogleAdsStreamRequestT>
public static interface GoogleAdsIO.RateLimitPolicy<GoogleAdsErrorT>
This interface can be used to implement custom client-side rate limiting policies. Custom
policies should follow best practices for interacting with the Google Ads API.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onBeforeRequest
(@Nullable String developerToken, String customerId, Message request) Called before a request is sent.void
Called after a request fails with a retryable error.void
Called after a request succeeds.
-
Method Details
-
onBeforeRequest
void onBeforeRequest(@Nullable String developerToken, String customerId, Message request) throws InterruptedException Called before a request is sent.- Parameters:
developerToken
- The developer token used for the request.customerId
- The customer ID specified on the request.request
- Any Google Ads API request.- Throws:
InterruptedException
-
onSuccess
Called after a request succeeds.- Parameters:
developerToken
- The developer token used for the request.customerId
- The customer ID specified on the request.request
- Any Google Ads API request.
-
onError
void onError(@Nullable String developerToken, String customerId, Message request, GoogleAdsErrorT error) Called after a request fails with a retryable error.- Parameters:
developerToken
- The developer token used for the request.customerId
- The customer ID specified on the request.request
- Any Google Ads API request.error
- A retryable error.
-