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
RateLimitPolicy
onSuccess
in interface RateLimitPolicy
records
- The list of retrieved records.java.lang.InterruptedException
public void onThrottle(KinesisClientThrottledException e) throws java.lang.InterruptedException
RateLimitPolicy
onThrottle
in interface RateLimitPolicy
e
- The KinesisClientThrottledException
thrown by the client.java.lang.InterruptedException