Top Description Fields Constructors Methods
org.apache.derby.impl.store.access.heap

pack-priv Class HeapCompressScan

extends HeapScan
Class Inheritance
Imports
org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.access.SpaceInfo, org.apache.derby.impl.store.access.conglomerate.RowPosition, org.apache.derby.iapi.store.raw.ContainerHandle, .Page, .RecordHandle, org.apache.derby.iapi.types.DataValueDescriptor, .RowLocation

A heap scan object represents an instance of a scan on a heap conglomerate.

Field Summary

Modifier and TypeField and Description
private long
pagenum_to_start_moving_rows

Fields of HeapScan

Constructor Summary

AccessConstructor and Description
public
HeapCompressScan()

The only constructor for a HeapCompressScan returns a scan in the closed state, the caller must call open.

Method Summary

Modifier and TypeMethod and Description
public int
fetchNextGroup(DataValueDescriptor[][] row_array, RowLocation[] old_rowloc_array, RowLocation[] new_rowloc_array)

Overrides org.apache.derby.impl.store.access.heap.HeapScan.fetchNextGroup.

Implements org.apache.derby.iapi.store.access.GroupFetchScanController.fetchNextGroup.

Protected override implementation of routines in GenericController class:

private int
fetchRowsForCompress(DataValueDescriptor[][] row_array, RowLocation[] oldrowloc_array, RowLocation[] newrowloc_array)

Fetch the next N rows from the table.

private void
positionAfterThisPage(RowPosition pos)

Set scan position to just after current page.

protected void
protected void
Inherited from org.apache.derby.impl.store.access.heap.HeapScan:
fetchLocationfetchNextfetchNextGroupgetScanInfomakeRowLocationnextpositionAtRowLocationqueueDeletePostCommitWorkreopenScanByRowLocationsetRowLocationArraysetRowLocationArray

Field Detail

pagenum_to_start_moving_rowsback to summary
private long pagenum_to_start_moving_rows

Fields of HeapScan

Constructor Detail

HeapCompressScanback to summary
public HeapCompressScan()

The only constructor for a HeapCompressScan returns a scan in the closed state, the caller must call open.

Method Detail

fetchNextGroupback to summary
public int fetchNextGroup(DataValueDescriptor[][] row_array, RowLocation[] old_rowloc_array, RowLocation[] new_rowloc_array) throws StandardException

Overrides org.apache.derby.impl.store.access.heap.HeapScan.fetchNextGroup.

Implements org.apache.derby.iapi.store.access.GroupFetchScanController.fetchNextGroup.

Protected override implementation of routines in GenericController class:

fetchRowsForCompressback to summary
private int fetchRowsForCompress(DataValueDescriptor[][] row_array, RowLocation[] oldrowloc_array, RowLocation[] newrowloc_array) throws StandardException

Fetch the next N rows from the table.

Utility routine used by both fetchSet() and fetchNextGroup().

Exceptions
StandardException:
Standard exception policy.
positionAfterThisPageback to summary
private void positionAfterThisPage(RowPosition pos) throws StandardException

Set scan position to just after current page.

Used to set the position of the scan if a record handle is not avaliable. In this case current_rh will be set to null, and current_pageno will be set to the current page number. On resume of the scan, the scan will be set to just before the first row returned form a getNextPage(current_pageno) call.

A positionAtResumeScan(scan_position) is necessary to continue the scan after this call.

Exceptions
StandardException:
Standard exception policy.
positionAtResumeScanback to summary
protected void positionAtResumeScan(RowPosition pos) throws StandardException

Overrides org.apache.derby.impl.store.access.conglomerate.GenericScanController.positionAtResumeScan.

Reposition the scan upon entering the fetchRows loop.

Called upon entering fetchRows() while in the SCAN_INPROGRESS state. Do work necessary to look at rows in the current page of the scan.

The default implementation uses a record handle to maintain a scan position. It will get the latch again on the current scan position and set the slot to the current record handle.

Exceptions
StandardException:
Standard exception policy.
positionAtStartForForwardScanback to summary
protected void positionAtStartForForwardScan(RowPosition pos) throws StandardException

Overrides org.apache.derby.impl.store.access.conglomerate.GenericScanController.positionAtStartForForwardScan.

Move the scan from SCAN_INIT to SCAN_INPROGRESS.

This routine is called to move the scan from SCAN_INIT to SCAN_INPROGRESS. Upon return from this routine it is expected that scan_position is set such that calling the generic scan loop will reach the first row of the scan. Note that this usually means setting the scan_postion to one before the 1st row to be returned.

Exceptions
StandardException:
Standard exception policy.