Class B2IMaxScan
java.lang.Object
org.apache.derby.impl.store.access.btree.OpenBTree
org.apache.derby.impl.store.access.btree.BTreeScan
org.apache.derby.impl.store.access.btree.BTreeMaxScan
org.apache.derby.impl.store.access.btree.index.B2IMaxScan
- All Implemented Interfaces:
ScanManager, GenericScanController, GroupFetchScanController, RowCountable, ScanController
Scan used to find maximum value in the secondary index.
This class implements an optimized interface to find the maximum row,
for a set of rows between an input start and stop key.
Note most work of this class is inherited from the generic btree implementation.
This class initializes the top level object and deals with locking information
specific to a secondary index implementation of a btree.
-
Field Summary
FieldsFields inherited from class BTreeScan
fetchNext_one_slot_array, init_fetchDesc, init_forUpdate, init_hold, init_lock_fetch_desc, init_qualifier, init_rawtran, init_scanColumnList, init_startKeyValue, init_startSearchOperator, init_stopKeyValue, init_stopSearchOperator, init_template, init_useUpdateLocks, lock_operation, SCAN_DONE, SCAN_HOLD_INIT, SCAN_HOLD_INPROGRESS, SCAN_INIT, SCAN_INPROGRESS, scan_state, stat_numdeleted_rows_visited, stat_numpages_visited, stat_numrows_qualified, stat_numrows_visitedFields inherited from class OpenBTree
btree_undo, container, err_containerid, init_lock_level, init_open_user_scans, runtime_memFields inherited from interface ScanController
GE, GT, NA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the scan.booleancloseForEndTransaction(boolean closeHeldScan) Close the scan, a commit or abort is about to happen.voidinit(TransactionManager xact_manager, Transaction rawtran, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level, boolean open_for_locking, FormatableBitSet scanColumnList, B2I conglomerate, B2IUndo undo) Initialize the scan for use.Methods inherited from class BTreeMaxScan
fetchMax, fetchRows, positionAtStartPositionMethods inherited from class BTreeScan
delete, didNotQualify, doesCurrentPositionQualify, fetch, fetchLocation, fetchNext, fetchNextGroup, fetchNextGroup, fetchSet, fetchWithoutQualify, getCurrentRecordHandleForDebugging, getScanInfo, init, isCurrentPositionDeleted, isHeldAfterCommit, isKeyed, newRowLocationTemplate, next, positionAtDoneScan, positionAtDoneScanFromClose, positionAtNextPage, positionAtPreviousPage, positionAtRowLocation, positionAtStartForForwardScan, process_qualifier, reopenScan, reopenScanByRowLocation, replace, reposition, toStringMethods inherited from class OpenBTree
checkConsistency, debugConglomerate, getColumnSortOrderInfo, getConglomerate, getContainer, getContainerHandle, getEstimatedRowCount, getHeight, getHold, getLockingPolicy, getLockLevel, getOpenMode, getRawTran, getRuntimeMem, getSpaceInfo, getXactMgr, init, isClosed, isTableLocked, reopen, setEstimatedRowCount, setLockingPolicy, test_errorsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface GenericScanController
isTableLockedMethods inherited from interface RowCountable
getEstimatedRowCount, setEstimatedRowCount
-
Field Details
-
base_cc_for_locking
-
-
Constructor Details
-
B2IMaxScan
B2IMaxScan()
-
-
Method Details
-
close
Close the scan.- Specified by:
closein interfaceGenericScanController- Overrides:
closein classBTreeScan- Throws:
StandardException- Standard exception policy.- See Also:
-
closeForEndTransaction
Close the scan, a commit or abort is about to happen.- Specified by:
closeForEndTransactionin interfaceScanManager- Overrides:
closeForEndTransactionin classBTreeScan- 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.
- Throws:
StandardException- Standard exception policy.
-
init
public void init(TransactionManager xact_manager, Transaction rawtran, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level, boolean open_for_locking, FormatableBitSet scanColumnList, B2I conglomerate, B2IUndo undo) throws StandardException Initialize the scan for use.Any changes to this method may have to be reflected in close as well.
The btree init opens the container (super.init), and stores away the state of the qualifiers. The actual searching for the first position is delayed until the first next() call.
- Throws:
StandardException- Standard exception policy.
-