ScanControllerRowSource, ScanManager, GenericScanController, GroupFetchScanController, RowCountable, RowLocationRetRowSource, RowSource, ScanController, ScanInfopublic class MergeScanRowSource extends MergeScan implements ScanControllerRowSource
mergeRuns, openScans, sortBufferGE, GT, NA| Constructor | Description |
|---|---|
MergeScanRowSource(MergeSort sort,
TransactionManager tran,
SortBuffer sortBuffer,
java.util.Vector<java.lang.Long> mergeRuns,
SortObserver sortObserver,
boolean hold) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
closeRowSource() |
Close the row source - implemented by MergeScan already
|
DataValueDescriptor[] |
getNextRowFromRowSource() |
Get the next row as an array of column objects.
|
FormatableBitSet |
getValidColumns() |
All columns are always set from a sorter
|
boolean |
needsRowLocation() |
needsRowLocation returns true iff this the row source expects the
drainer of the row source to call rowLocation after getting a row from
getNextRowFromRowSource.
|
boolean |
needsRowLocationForDeferredCheckConstraints() |
|
boolean |
needsToClone() |
Does the caller of getNextRowFromRowSource() need to clone the row
in order to keep a reference to the row past the
getNextRowFromRowSource() call which returned the row.
|
boolean |
next() |
Move to the next position in the scan.
|
void |
offendingRowLocation(RowLocation rl,
long containdId) |
|
void |
rowLocation(RowLocation rl) |
rowLocation is a callback for the drainer of the row source to return
the rowLocation of the current row, i.e, the row that is being returned
by getNextRowFromRowSource.
|
close, getScanInfo, isKeyed, isTableLocked, newRowLocationTemplate, reopenScan, reopenScanByRowLocationclose, closeForEndTransaction, init, mergeARowclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEstimatedRowCount, setEstimatedRowCountdelete, didNotQualify, doesCurrentPositionQualify, fetchLocation, fetchNextGroup, fetchNextGroup, fetchSet, getAllScanInfo, getEstimatedRowCount, getScanInfo, isCurrentPositionDeleted, isHeldAfterCommit, isKeyed, isTableLocked, newRowLocationTemplate, positionAtRowLocation, reopenScan, reopenScanByRowLocation, replace, setEstimatedRowCountdelete, didNotQualify, doesCurrentPositionQualify, fetch, fetchLocation, fetchNext, fetchWithoutQualify, isCurrentPositionDeleted, isHeldAfterCommit, positionAtRowLocation, replacefetch, fetchNext, fetchWithoutQualifyMergeScanRowSource(MergeSort sort, TransactionManager tran, SortBuffer sortBuffer, java.util.Vector<java.lang.Long> mergeRuns, SortObserver sortObserver, boolean hold)
public boolean next()
throws StandardException
MergeScannext in interface GroupFetchScanControllernext in interface ScanControllernext in class MergeScanStandardException - Standard exception policy.ScanController.next()public DataValueDescriptor[] getNextRowFromRowSource() throws StandardException
RowSourceA null column can be specified by leaving the object null, or indicated by returning a non-null getValidColumns. On streaming columns, it can be indicated by returning a non-null get FieldStates.
If RowSource.needToClone() is true then the returned row (the DataValueDescriptor[]) is guaranteed not to be modified by drainer of the RowSource (except that the input stream will be read, of course) and drainer will keep no reference to it before making the subsequent nextRow call. So it is safe to return the same DataValueDescriptor[] in subsequent nextRow calls if that is desirable for performance reasons.
If RowSource.needToClone() is false then the returned row (the DataValueDescriptor[]) may be be modified by drainer of the RowSource, and the drainer may keep a reference to it after making the subsequent nextRow call. In this case the client should severe all references to the row after returning it from getNextRowFromRowSource().
getNextRowFromRowSource in interface RowSourceStandardException - Standard Derby Error Policypublic boolean needsRowLocation()
RowLocationRetRowSourceneedsRowLocation in interface RowLocationRetRowSourceRowLocationRetRowSource.needsRowLocation()public boolean needsRowLocationForDeferredCheckConstraints()
needsRowLocationForDeferredCheckConstraints in interface RowLocationRetRowSourcepublic boolean needsToClone()
RowSourceneedsToClone in interface RowSourceRowSource.needsToClone()public void rowLocation(RowLocation rl)
RowLocationRetRowSource
boolean needsRL = rowSource.needsRowLocation();
DataValueDescriptor[] row;
while((row = rowSource.getNextRowFromRowSource()) != null)
{
RowLocation rl = heapConglomerate.insertRow(row);
if (needsRL)
rowSource.rowLocation(rl);
}
rowLocation in interface RowLocationRetRowSourceRowLocationRetRowSource.rowLocation(org.apache.derby.iapi.types.RowLocation)public void offendingRowLocation(RowLocation rl, long containdId) throws StandardException
offendingRowLocation in interface RowLocationRetRowSourceStandardExceptionpublic FormatableBitSet getValidColumns()
getValidColumns in interface RowSourcepublic void closeRowSource()
closeRowSource in interface RowSourceApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.