public static class RateLimitPolicyFactory.DefaultRateLimiter extends java.lang.Object implements RateLimitPolicy
| Constructor and Description |
|---|
DefaultRateLimiter(org.apache.beam.sdk.util.BackOff emptySuccess,
org.apache.beam.sdk.util.BackOff throttled) |
DefaultRateLimiter(Duration emptySuccessBaseDelay,
Duration throttledBaseDelay,
Duration maxDelay) |
| Modifier and Type | Method and Description |
|---|---|
void |
onSuccess(java.util.List<KinesisRecord> records)
Called after Kinesis records are successfully retrieved.
|
void |
onThrottle(KinesisClientThrottledException e)
Called after the Kinesis client is throttled.
|
public DefaultRateLimiter(org.apache.beam.sdk.util.BackOff emptySuccess,
org.apache.beam.sdk.util.BackOff throttled)
public void onSuccess(java.util.List<KinesisRecord> records) throws java.lang.InterruptedException
RateLimitPolicyonSuccess in interface RateLimitPolicyrecords - The list of retrieved records.java.lang.InterruptedExceptionpublic void onThrottle(KinesisClientThrottledException e) throws java.lang.InterruptedException
RateLimitPolicyonThrottle in interface RateLimitPolicye - The KinesisClientThrottledException thrown by the client.java.lang.InterruptedException