Top Fields Constructors Methods
org.apache.derby.impl.store.access.btree

public Class BTreeRowPosition

extends RowPosition
Class Inheritance
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.services.io.FormatableBitSet, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.store.raw.Page, .FetchDescriptor, org.apache.derby.iapi.store.access.RowUtil, org.apache.derby.iapi.types.DataValueDescriptor, .RowLocation, org.apache.derby.impl.store.access.conglomerate.RowPosition

Field Summary

Modifier and TypeField and Description
public LeafControlRow
public RowLocation
public DataValueDescriptor[]
public DataValueDescriptor[]
current_positionKey

Fields of the class

protected LeafControlRow
private final BTreeScan
parent

The scan that owns this position object.

private DataValueDescriptor[]
positionKey_template

Cached template for saving this position by key.

private FetchDescriptor
savedFetchDescriptor

Cached fetch descriptor that can be used to fetch the key columns that are not already fetched by the scan.

pack-priv long
versionWhenSaved

The version number of the leaf page when this position was saved by key.

Inherited from org.apache.derby.impl.store.access.conglomerate.RowPosition:
current_pagecurrent_pagenocurrent_rhcurrent_rh_qualifiedcurrent_slot

Constructor Summary

AccessConstructor and Description
public
BTreeRowPosition(BTreeScan parent)

Constructors for This class:

Method Summary

Modifier and TypeMethod and Description
pack-priv FetchDescriptor

Returns:

a fetch descriptor
getFetchDescriptorForSaveKey
(int[]
an array which tells which columns the partial key contains (valid columns have non-zero values in the array)
vcols
,
int
the length of the full key to create a fetch descriptor for (may be greater than vcols.length)
fullLength
)

Get a fetch descriptor that can be used to fetch the missing columns in a partial key.

pack-priv DataValueDescriptor[]

Returns:

an array into which the position key can be copied
getKeyTemplate
()

Get a template into which the position key can be copied.

public void
public void
saveMeAndReleasePage()

Save this position by key and release the latch on the current leaf.

public final String
toString()

Overrides org.apache.derby.impl.store.access.conglomerate.RowPosition.toString.

Returns a string representation of the object.

public final void
Inherited from org.apache.derby.impl.store.access.conglomerate.RowPosition:
positionAtNextSlotpositionAtPrevSlot

Field Detail

current_leafback to summary
public LeafControlRow current_leaf
current_lock_row_locback to summary
public RowLocation current_lock_row_loc
current_lock_templateback to summary
public DataValueDescriptor[] current_lock_template
current_positionKeyback to summary
public DataValueDescriptor[] current_positionKey

Fields of the class

next_leafback to summary
protected LeafControlRow next_leaf
parentback to summary
private final BTreeScan parent

The scan that owns this position object.

positionKey_templateback to summary
private DataValueDescriptor[] positionKey_template

Cached template for saving this position by key.

savedFetchDescriptorback to summary
private FetchDescriptor savedFetchDescriptor

Cached fetch descriptor that can be used to fetch the key columns that are not already fetched by the scan. The fetch descriptor is used when this position is about to be saved by its full key.

versionWhenSavedback to summary
pack-priv long versionWhenSaved

The version number of the leaf page when this position was saved by key. Only valid if current_positionKey is non-null. This value is used to decide whether repositioning should be performed by using the key, or if current_rh could be used directly.

Constructor Detail

BTreeRowPositionback to summary
public BTreeRowPosition(BTreeScan parent)

Constructors for This class:

Method Detail

getFetchDescriptorForSaveKeyback to summary
pack-priv FetchDescriptor getFetchDescriptorForSaveKey(int[] vcols, int fullLength)

Get a fetch descriptor that can be used to fetch the missing columns in a partial key. The fetch descriptor is only created on the first call to this method. The returned descriptor will be cached, so subsequent calls will return the same descriptor and the arguments to this method should be the same between invokations.

Parameters
vcols:int[]

an array which tells which columns the partial key contains (valid columns have non-zero values in the array)

fullLength:int

the length of the full key to create a fetch descriptor for (may be greater than vcols.length)

Returns:FetchDescriptor

a fetch descriptor

getKeyTemplateback to summary
pack-priv DataValueDescriptor[] getKeyTemplate() throws StandardException

Get a template into which the position key can be copied. The value is cached, so two calls to this method on the same object will return the same object.

Returns:DataValueDescriptor[]

an array into which the position key can be copied

Exceptions
StandardException:
if an error occurs while allocating the template array
initback to summary
public void init()

Overrides org.apache.derby.impl.store.access.conglomerate.RowPosition.init.

Public Methods of This class:

saveMeAndReleasePageback to summary
public void saveMeAndReleasePage() throws StandardException

Save this position by key and release the latch on the current leaf.

Exceptions
StandardException:
if an error occurs while saving the position
See Also
BTreeScan#savePositionAndReleasePage()
toStringback to summary
public final String toString()

Overrides org.apache.derby.impl.store.access.conglomerate.RowPosition.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

unlatchback to summary
public final void unlatch()

Overrides org.apache.derby.impl.store.access.conglomerate.RowPosition.unlatch.