Class RateLimitPolicyFactory.DefaultRateLimiter
java.lang.Object
org.apache.beam.sdk.io.aws2.kinesis.RateLimitPolicyFactory.DefaultRateLimiter
- All Implemented Interfaces:
 RateLimitPolicy
- Enclosing interface:
 RateLimitPolicyFactory
public static class RateLimitPolicyFactory.DefaultRateLimiter
extends Object
implements RateLimitPolicy
Default rate limiter that throttles reading from a shard using an exponential backoff if the
 response is empty or if the consumer is throttled by AWS.
- 
Constructor Summary
ConstructorsConstructorDescriptionDefaultRateLimiter(org.apache.beam.sdk.util.BackOff emptySuccess, org.apache.beam.sdk.util.BackOff throttled) DefaultRateLimiter(Duration emptySuccessBaseDelay, Duration throttledBaseDelay, Duration maxDelay)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidonSuccess(List<KinesisRecord> records) Called after Kinesis records are successfully retrieved.voidCalled after the Kinesis client is throttled. 
- 
Constructor Details
- 
DefaultRateLimiter
public DefaultRateLimiter(org.apache.beam.sdk.util.BackOff emptySuccess, org.apache.beam.sdk.util.BackOff throttled)  - 
DefaultRateLimiter
 
 - 
 - 
Method Details
- 
onSuccess
Description copied from interface:RateLimitPolicyCalled after Kinesis records are successfully retrieved.- Specified by:
 onSuccessin interfaceRateLimitPolicy- Parameters:
 records- The list of retrieved records.- Throws:
 InterruptedException
 - 
onThrottle
Description copied from interface:RateLimitPolicyCalled after the Kinesis client is throttled.- Specified by:
 onThrottlein interfaceRateLimitPolicy- Parameters:
 e- TheKinesisClientThrottledExceptionthrown by the client.- Throws:
 InterruptedException
 
 -