| java.lang.Object org.apache.derby.impl.store.access.sort.Scan
All known Subclasses: org.apache.derby.impl.store.access.sort.SortScan, org.apache.derby.impl.store.access.sort.SortBufferRowSource,
Scan | abstract public class Scan implements ScanManager,ScanInfo(Code) | | Abstract base class for all sort classes which return rows from the
sort. Subclasses must implement fetch, next, and close.
|
Method Summary | |
public boolean | delete() Delete the row at the current position of the scan. | public void | didNotQualify() A call to allow client to indicate that current row does not qualify.
Indicates to the ScanController that the current row does not
qualify for the scan. | public boolean | doesCurrentPositionQualify() Returns true if the current position of the scan still qualifies
under the set of qualifiers passed to the openScan(). | public void | fetchLocation(RowLocation templateLocation) Fetch the location of the current position in the scan. | public int | fetchNextGroup(DataValueDescriptor[][] row_array, RowLocation[] rowloc_array) Fetch the next N rows from the table. | public int | fetchNextGroup(DataValueDescriptor[][] row_array, RowLocation[] old_rowloc_array, RowLocation[] new_rowloc_array) | public void | fetchSet(long max_rowcnt, int[] key_column_numbers, BackingStoreHashtable hash_table) Insert all rows that qualify for the current scan into the input
Hash table. | public Properties | getAllScanInfo(Properties prop) Return all information gathered about the scan.
This routine returns a list of properties which contains all information
gathered about the scan. | public long | getEstimatedRowCount() Get the total estimated number of rows in the container.
The number is a rough estimate and may be grossly off. | public ScanInfo | getScanInfo() Return ScanInfo object which describes performance of scan. | public boolean | isCurrentPositionDeleted() Returns true if the current position of the scan is at a
deleted row. | public boolean | isKeyed() Return whether this is a keyed conglomerate. | public boolean | isTableLocked() Return whether this scan is table locked. | public RowLocation | newRowLocationTemplate() Return a row location object of the correct type to be
used in calls to fetchLocation. | public boolean | positionAtRowLocation(RowLocation rl) | public void | reopenScan(DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator) Reposition the current scan. | public void | reopenScanByRowLocation(RowLocation startRowLocation, Qualifier qualifier) Reposition the current scan. | public boolean | replace(DataValueDescriptor[] val, FormatableBitSet validColumns) Replace the entire row at the current position of the scan. | public void | savePosition(Conglomerate conglom, Page page) Do work necessary to maintain the current position in the scan. | public void | setEstimatedRowCount(long count) Set the total estimated number of rows in the container.
Often, after a scan, the client of RawStore has a much better estimate
of the number of rows in the container than what store has. |
didNotQualify | public void didNotQualify() throws StandardException(Code) | | A call to allow client to indicate that current row does not qualify.
Indicates to the ScanController that the current row does not
qualify for the scan. If the isolation level of the scan allows,
this may result in the scan releasing the lock on this row.
Note that some scan implimentations may not support releasing locks on
non-qualifying rows, or may delay releasing the lock until sometime
later in the scan (ie. it may be necessary to keep the lock until
either the scan is repositioned on the next row or page).
This call should only be made while the scan is positioned on a current
valid row.
This call does not make sense for sort scans.
exception: StandardException - Standard exception policy. |
fetchSet | public void fetchSet(long max_rowcnt, int[] key_column_numbers, BackingStoreHashtable hash_table) throws StandardException(Code) | | Insert all rows that qualify for the current scan into the input
Hash table.
Currently unimplemented for sorts.
|
getAllScanInfo | public Properties getAllScanInfo(Properties prop) throws StandardException(Code) | | Return all information gathered about the scan.
This routine returns a list of properties which contains all information
gathered about the scan. If a Property is passed in, then that property
list is appeneded to, otherwise a new property object is created and
returned.
Currently sort scans doesn't track any information.
Parameters: prop - Property list to fill in. exception: StandardException - Standard exception policy. |
getEstimatedRowCount | public long getEstimatedRowCount() throws StandardException(Code) | | Get the total estimated number of rows in the container.
The number is a rough estimate and may be grossly off. In general
the server will cache the row count and then occasionally write
the count unlogged to a backing store. If the system happens to
shutdown before the store gets a chance to update the row count it
may wander from reality.
This call is currently only supported on Heap conglomerates, it
will throw an exception if called on btree conglomerates.
The total estimated number of rows in the conglomerate. exception: StandardException - Standard exception policy. |
getScanInfo | public ScanInfo getScanInfo() throws StandardException(Code) | | Return ScanInfo object which describes performance of scan.
Return ScanInfo object which contains information about the current
scan.
Currently the ScanInfo does not have any performance data.
See Also: ScanInfo The ScanInfo object which contains info about current scan. exception: StandardException - Standard exception policy. |
isKeyed | public boolean isKeyed()(Code) | | Return whether this is a keyed conglomerate.
whether this is a keyed conglomerate. |
isTableLocked | public boolean isTableLocked()(Code) | | Return whether this scan is table locked.
whether this is table locked. |
reopenScanByRowLocation | public void reopenScanByRowLocation(RowLocation startRowLocation, Qualifier qualifier) throws StandardException(Code) | | Reposition the current scan. This call is semantically the same as if
the current scan had been closed and a openScan() had been called instead.
The scan is reopened against the same conglomerate, and the scan
is reopened with the same "scan column list", "hold" and "forUpdate"
parameters passed in the original openScan.
exception: StandardException - Standard exception policy. |
savePosition | public void savePosition(Conglomerate conglom, Page page) throws StandardException(Code) | | Do work necessary to maintain the current position in the scan.
The latched page in the conglomerate "congomid" is changing, do
whatever is necessary to maintain the current position of the scan.
For some conglomerates this may be a no-op.
Parameters: conglom - Conglomerate object of the conglomerate being changed. Parameters: page - Page in the conglomerate being changed. exception: StandardException - Standard exception policy. |
setEstimatedRowCount | public void setEstimatedRowCount(long count) throws StandardException(Code) | | Set the total estimated number of rows in the container.
Often, after a scan, the client of RawStore has a much better estimate
of the number of rows in the container than what store has. For
instance if we implement some sort of update statistics command, or
just after a create index a complete scan will have been done of the
table. In this case this interface allows the client to set the
estimated row count for the container, and store will use that number
for all future references.
This call is currently only supported on Heap conglomerates, it
will throw an exception if called on btree conglomerates.
Parameters: count - the estimated number of rows in the container. exception: StandardException - Standard exception policy. |
|
|