Module org.apache.jena.arq
Class RowSetBuffered<T extends RowSet>
java.lang.Object
org.apache.jena.atlas.iterator.IteratorSlotted<Binding>
org.apache.jena.riot.rowset.rw.rs_json.RowSetBuffered<T>
- All Implemented Interfaces:
Iterator<Binding>
,org.apache.jena.atlas.iterator.IteratorCloseable<Binding>
,org.apache.jena.atlas.lib.Closeable
,RowSet
public class RowSetBuffered<T extends RowSet>
extends org.apache.jena.atlas.iterator.IteratorSlotted<Binding>
implements RowSet
A buffering RowSet wrapper for stream-backed RowSets whose
getResultVars()
returns null as long as the header has not been
seen on the stream.
Calling getResultVars()
buffers bindings from the delegate RowSet
until it returns a non-null value for its result vars.
The buffered bindings are replayed on this instance in their appropriate
order.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.sparql.exec.RowSet
RowSet.Exception
-
Constructor Summary
ConstructorDescriptionRowSetBuffered
(T delegate, Supplier<DataBag<Binding>> bufferFactory) RowSetBuffered
(T delegate, Supplier<DataBag<Binding>> bufferFactory, long rowNumber) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Reads and buffers bindings until the delegate's header no longer returns nulllong
Return the row number.Methods inherited from class org.apache.jena.atlas.iterator.IteratorSlotted
close, hasNext, next, peek, peek
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
Methods inherited from interface org.apache.jena.sparql.exec.RowSet
close, forEach, hasNext, materialize, next, rewindable, stream
-
Constructor Details
-
RowSetBuffered
-
RowSetBuffered
-
-
Method Details
-
getDelegate
-
getResultVars
Reads and buffers bindings until the delegate's header no longer returns null- Specified by:
getResultVars
in interfaceRowSet
-
getRowNumber
public long getRowNumber()Description copied from interface:RowSet
Return the row number. The first row is row 1.- Specified by:
getRowNumber
in interfaceRowSet
-
closeIterator
public void closeIterator()
-