Class HandlerBackedIterator<T>

java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<T>
com.complexible.common.base.CloseableIterator.AbstractCloseableIterator<T>
com.complexible.common.base.HandlerBackedIterator<T>
All Implemented Interfaces:
CloseableIterator<T>, AutoCloseable, Iterator<T>

public class HandlerBackedIterator<T> extends CloseableIterator.AbstractCloseableIterator<T>
An adapter for converting push-based data processing (aka handler-based) to pull-based data processing (aka iterator-based).
Since:
7.4.6
Author:
Pavel Klinov
  • Constructor Details

  • Method Details

    • close

      public void close()
      Closes the iterator and cancels the producer if it hasn't yet finished. If the producer throws after its future is checked but before it is canceled, the exception will be thrown from this method.
    • computeNext

      protected T computeNext()
      Specified by:
      computeNext in class com.google.common.collect.AbstractIterator<T>