Package io.servicetalk.concurrent
Interface BlockingSpliterator<T>
-
- Type Parameters:
T
- the type of elements returned by thisSpliterator
.
- All Superinterfaces:
java.lang.AutoCloseable
,java.util.Spliterator<T>
public interface BlockingSpliterator<T> extends java.util.Spliterator<T>, java.lang.AutoCloseable
AnSpliterator
which supportsAutoCloseable.close()
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.Spliterator
java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,T_CONS extends java.lang.Object,T_SPLITR extends java.util.Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
This method is used to communicate that you are no longer interested in consuming data.BlockingSpliterator<T>
trySplit()
-
-
-
Method Detail
-
trySplit
BlockingSpliterator<T> trySplit()
- Specified by:
trySplit
in interfacejava.util.Spliterator<T>
-
close
void close() throws java.lang.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 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 interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
-