public class CollectingBatchConsumer<S,R> extends java.lang.Object implements BatchConsumer
Constructor and Description |
---|
CollectingBatchConsumer(java.util.stream.Collector<Row,S,R> collector) |
Modifier and Type | Method and Description |
---|---|
void |
accept(BatchIterator iterator,
java.lang.Throwable failure)
Start consumption of the given
BatchIterator . |
java.util.concurrent.CompletableFuture<R> |
resultFuture() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiresScroll
public java.util.concurrent.CompletableFuture<R> resultFuture()
public void accept(BatchIterator iterator, @Nullable java.lang.Throwable failure)
BatchConsumer
BatchIterator
.
The given iterator must be in it's start position and must be usable until BatchIterator.close()
is called.
If failure
is not null the iterator
cannot be used,
but instead the consumer has to process the failure.
accept
in interface BatchConsumer
accept
in interface java.util.function.BiConsumer<BatchIterator,java.lang.Throwable>
iterator
- the iterator to be consumed, if a failure is present this iterator isn't usable or null.failure
- the cause of the failure or null if successful