public abstract class BufferingSequence extends DelegatingSequence
NodeSequence.AlternateSizeBatch, NodeSequence.Batch, NodeSequence.LimitBatch, NodeSequence.MultiWidthBatch, NodeSequence.Restartable, NodeSequence.RowAccessor, NodeSequence.RowFilter, NodeSequence.SingleWidthBatch
Modifier and Type | Field and Description |
---|---|
protected BufferManager.SortingBuffer<Object,BufferedRows.BufferedRow> |
buffer |
protected CachedNodeSupplier |
cache |
protected RowExtractors.ExtractFromRow |
extractor |
protected static Logger |
logger |
protected AtomicLong |
remainingRowCount |
protected BufferedRows.BufferedRowFactory<? extends BufferedRows.BufferedRow> |
rowFactory |
protected AtomicLong |
rowsLeftInBatch |
protected static boolean |
trace |
protected int |
width |
protected String |
workspaceName |
delegate
LOGGER, NO_PASS_ROW_FILTER, PASS_ROW_FILTER
Modifier | Constructor and Description |
---|---|
protected |
BufferingSequence(String workspaceName,
NodeSequence delegate,
RowExtractors.ExtractFromRow extractor,
BufferManager bufferMgr,
CachedNodeSupplier nodeCache,
boolean pack,
boolean useHeap,
boolean allowDuplicates) |
Modifier and Type | Method and Description |
---|---|
protected NodeSequence.Batch |
batchFrom(Iterator<BufferedRows.BufferedRow> rows,
long maxBatchSize) |
void |
close()
Signal that this node sequence is no longer needed.
|
protected BufferedRows.BufferedRow |
createRow(NodeSequence.Batch currentRow) |
boolean |
isEmpty()
Determine whether this results is known to be empty.
|
protected int |
loadAll(NodeSequence sequence,
RowExtractors.ExtractFromRow extractor,
BufferManager.DistinctBuffer<BufferedRows.BufferedRow> rowsWithNullKey)
Load all of the rows from the supplied sequence into the buffer.
|
protected long |
rowCount() |
getRowCount, nextBatch, width
append, batchFilteredWith, batchOf, batchOf, batchOf, batchOfKeys, batchOfKeys, batchOfKeys, batchOfKeys, batchWithCount, copy, emptyBatch, emptySequence, filter, keyFor, limit, limit, merging, requireBoth, requireEither, skip, slice, slicingBatch, withBatch, withBatches, withBatches, withNode, withNodeKeys, withNodeKeys, withNodeKeys, withNodeKeys, withNodes, withNodes
protected static final Logger logger
protected static final boolean trace
protected final BufferManager.SortingBuffer<Object,BufferedRows.BufferedRow> buffer
protected final BufferedRows.BufferedRowFactory<? extends BufferedRows.BufferedRow> rowFactory
protected final RowExtractors.ExtractFromRow extractor
protected final CachedNodeSupplier cache
protected final int width
protected final String workspaceName
protected final AtomicLong remainingRowCount
protected final AtomicLong rowsLeftInBatch
protected BufferingSequence(String workspaceName, NodeSequence delegate, RowExtractors.ExtractFromRow extractor, BufferManager bufferMgr, CachedNodeSupplier nodeCache, boolean pack, boolean useHeap, boolean allowDuplicates)
public boolean isEmpty()
NodeSequence
isEmpty
in class DelegatingSequence
protected long rowCount()
protected BufferedRows.BufferedRow createRow(NodeSequence.Batch currentRow)
protected int loadAll(NodeSequence sequence, RowExtractors.ExtractFromRow extractor, BufferManager.DistinctBuffer<BufferedRows.BufferedRow> rowsWithNullKey)
sequence
- the node sequence; may not be nullextractor
- the extractor for the sortable value; may not be nullrowsWithNullKey
- the buffer into which should be placed all rows for which the extracted key value is null; may be
null if these are not to be keptprotected NodeSequence.Batch batchFrom(Iterator<BufferedRows.BufferedRow> rows, long maxBatchSize)
public void close()
NodeSequence
close
in class DelegatingSequence
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.