Interface RateLimiter<SplitT extends SourceSplit>

    • Method Detail

      • acquire

        default CompletionStage<Void> acquire()
        Returns a future that is completed once another event would not exceed the rate limit. For correct functioning, the next invocation of this method should only happen after the previously returned future has been completed.
      • acquire

        CompletionStage<Void> acquire​(int numberOfEvents)
        Returns a future that is completed once other events would not exceed the rate limit. For correct functioning, the next invocation of this method should only happen after the previously returned future has been completed.
        Parameters:
        numberOfEvents - The number of events.
      • notifyCheckpointComplete

        default void notifyCheckpointComplete​(long checkpointId)
        Notifies this 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.
        Parameters:
        checkpointId - The ID of the checkpoint that has been completed.
      • notifyAddingSplit

        default void notifyAddingSplit​(SplitT split)
        Notifies this RateLimiter that a new split has been added. For correct functioning, this method should only be invoked after the returned future of previous acquire(int) method invocation has been completed.
        Parameters:
        split - The split that has been added.