Package io.servicetalk.concurrent
Interface BlockingSpliterator<T>
- Type Parameters:
T
- the type of elements returned by thisSpliterator
.
- All Superinterfaces:
AutoCloseable
,Spliterator<T>
An
Spliterator
which supports AutoCloseable.close()
.-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T extends Object,
T_CONS extends Object, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Method Summary
Methods inherited from interface java.util.Spliterator
characteristics, estimateSize, forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics, tryAdvance
-
Method Details
-
trySplit
BlockingSpliterator<T> trySplit()- Specified by:
trySplit
in interfaceSpliterator<T>
-
close
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 thisSpliterator
.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 interfaceAutoCloseable
- Throws:
Exception
-