public class CloseableIteratorCollectionStream<I,O> extends Object implements ReadStream<O>
| Constructor and Description |
|---|
CloseableIteratorCollectionStream(Context context,
Supplier<org.infinispan.commons.util.CloseableIteratorCollection<I>> iterableSupplier,
Function<I,O> converter) |
| Modifier and Type | Method and Description |
|---|---|
CloseableIteratorCollectionStream<I,O> |
endHandler(Handler<Void> handler)
Set an end handler.
|
CloseableIteratorCollectionStream<I,O> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
CloseableIteratorCollectionStream<I,O> |
fetch(long amount)
Fetch the specified
amount of elements. |
CloseableIteratorCollectionStream<I,O> |
handler(Handler<O> handler)
Set a data handler.
|
CloseableIteratorCollectionStream<I,O> |
pause()
Pause the
ReadStream, it sets the buffer in fetch mode and clears the actual demand. |
CloseableIteratorCollectionStream<I,O> |
resume()
Resume reading, and sets the buffer in
flowing mode. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpipe, pipeTo, pipeTopublic CloseableIteratorCollectionStream<I,O> exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<O>exceptionHandler in interface StreamBasehandler - the exception handlerpublic CloseableIteratorCollectionStream<I,O> handler(Handler<O> handler)
ReadStreamhandler in interface ReadStream<O>public CloseableIteratorCollectionStream<I,O> pause()
ReadStreamReadStream, it sets the buffer in fetch mode and clears the actual demand.
While it's paused, no data will be sent to the data handler.
pause in interface ReadStream<O>public CloseableIteratorCollectionStream<I,O> fetch(long amount)
ReadStreamamount of elements. If the ReadStream has been paused, reading will
recommence with the specified amount of items, otherwise the specified amount will
be added to the current stream demand.fetch in interface ReadStream<O>public CloseableIteratorCollectionStream<I,O> resume()
ReadStreamflowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface ReadStream<O>public CloseableIteratorCollectionStream<I,O> endHandler(Handler<Void> handler)
ReadStreamendHandler in interface ReadStream<O>Copyright © 2020. All rights reserved.