Class ThrottledIterator<T>

java.lang.Object
org.apache.flink.streaming.examples.utils.ThrottledIterator<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializable, Iterator<T>

public class ThrottledIterator<T> extends Object implements Iterator<T>, Serializable
A variant of the collection source (emits a sequence of elements as a stream) that supports throttling the emission rate.
See Also:
  • Constructor Details

    • ThrottledIterator

      public ThrottledIterator(Iterator<T> source, long elementsPerSecond)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>