@NotThreadSafe @Experimental public interface RateLimiter
Modifier and Type | Method and Description |
---|---|
CompletionStage<Void> |
acquire()
Returns a future that is completed once another event would not exceed the rate limit.
|
default void |
notifyCheckpointComplete(long checkpointId)
Notifies this
RateLimiter that the checkpoint with the given checkpointId
completed and was committed. |
CompletionStage<Void> acquire()
default void notifyCheckpointComplete(long checkpointId)
RateLimiter
that the checkpoint with the given checkpointId
completed and was committed. Makes it possible to implement rate limiters that control data
emission per checkpoint cycle.checkpointId
- The ID of the checkpoint that has been completed.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.