Class SortBufferScan
java.lang.Object
org.apache.derby.impl.store.access.sort.Scan
org.apache.derby.impl.store.access.sort.SortScan
org.apache.derby.impl.store.access.sort.SortBufferScan
- All Implemented Interfaces:
ScanManager
,GenericScanController
,GroupFetchScanController
,RowCountable
,ScanController
,ScanInfo
A sort scan that just reads rows out of a sorter.
-
Field Summary
FieldsFields inherited from class org.apache.derby.impl.store.access.sort.SortScan
current, hold, sort, tran
Fields inherited from interface org.apache.derby.iapi.store.access.ScanController
GE, GT, NA
-
Constructor Summary
ConstructorsConstructorDescriptionSortBufferScan
(MergeSort sort, TransactionManager tran, SortBuffer sortBuffer, boolean hold) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the scan.boolean
closeForEndTransaction
(boolean closeHeldScan) Close the scan.boolean
next()
Move to the next position in the scan.Methods inherited from class org.apache.derby.impl.store.access.sort.SortScan
fetch, fetchNext, fetchWithoutQualify
Methods inherited from class org.apache.derby.impl.store.access.sort.Scan
delete, didNotQualify, doesCurrentPositionQualify, fetchLocation, fetchNextGroup, fetchNextGroup, fetchSet, getAllScanInfo, getEstimatedRowCount, getScanInfo, isCurrentPositionDeleted, isHeldAfterCommit, isKeyed, isTableLocked, newRowLocationTemplate, positionAtRowLocation, reopenScan, reopenScanByRowLocation, replace, setEstimatedRowCount
-
Field Details
-
sortBuffer
The sorter we're returning rows from.
-
-
Constructor Details
-
SortBufferScan
SortBufferScan(MergeSort sort, TransactionManager tran, SortBuffer sortBuffer, boolean hold)
-
-
Method Details
-
next
Move to the next position in the scan.- Returns:
- True if there is a next position in the scan, false if there isn't.
- Throws:
StandardException
- Standard exception policy.- See Also:
-
closeForEndTransaction
public boolean closeForEndTransaction(boolean closeHeldScan) Close the scan.- Parameters:
closeHeldScan
- If true, means to close scan even if it has been opened to be kept opened across commit. This is used to close these scans on abort.- Returns:
- boolean indicating that the close has resulted in a real close of the scan. A held scan will return false if called by closeForEndTransaction(false), otherwise it will return true. A non-held scan will always return true.
-
close
public void close()Close the scan.- Specified by:
close
in interfaceGenericScanController
- Overrides:
close
in classSortScan
- See Also:
-