Interface BlockingSpliterator<T>

Type Parameters:
T - the type of elements returned by this Spliterator.
All Superinterfaces:
AutoCloseable, Spliterator<T>

public interface BlockingSpliterator<T> extends Spliterator<T>, AutoCloseable
  • Method Details

    • trySplit

      BlockingSpliterator<T> trySplit()
      Specified by:
      trySplit in interface Spliterator<T>
    • close

      void close() throws Exception
      This method is used to communicate that you are no longer interested in consuming data. This provides a "best effort" notification to the producer of data that you are no longer interested in data from this Spliterator.

      If all the data has not been consumed this may have transport implications (e.g. if the source of data comes from a socket or file descriptor). If all data has been consumed, or this BlockingIterator has previously been closed this should be a noop.

      Specified by:
      close in interface AutoCloseable