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

pack-priv final Class MergeInserter

extends Object
implements SortController
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.store.access.SortController
Imports
java.util.Vector, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.access.conglomerate.TransactionManager, org.apache.derby.iapi.store.access.SortController, .SortInfo, org.apache.derby.iapi.types.DataValueDescriptor

Field Summary

Modifier and TypeField and Description
private boolean
private long
beginMemoryUsage

Information about memory usage to dynamically tune the in-memory sort buffer size.

private Vector<Long>
mergeRuns

A vector of the conglomerate ids of the merge runs.

private int
private MergeSort
sort

The sort this inserter is for.

private SortBuffer
sortBuffer

An in-memory ordered set that is used to sort rows before they're sent to merge runs.

pack-priv Vector<Integer>
pack-priv int
pack-priv int
pack-priv int
pack-priv String
private int
private TransactionManager
tran

The transaction this inserter is in.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
completedInserts()

Implements org.apache.derby.iapi.store.access.SortController.completedInserts.

Called when the caller has completed inserting rows into the sorter.

public SortInfo

Returns:

The SortInfo object which contains info about current sort.
getSortInfo
()

Implements org.apache.derby.iapi.store.access.SortController.getSortInfo.

Return SortInfo object which contains information about the current sort.

pack-priv boolean

Returns:

true if initialization was successful
initialize
(MergeSort sort, TransactionManager tran)

Initialize this inserter.

public void
insert(DataValueDescriptor[]
The row to insert into the SortController. The stored representations of the row's columns are copied into a new row somewhere in the sort.
row
)

Implements org.apache.derby.iapi.store.access.SortController.insert.

Insert a row into the sort.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

avoidMergeRunback to summary
private boolean avoidMergeRun
beginMemoryUsageback to summary
private long beginMemoryUsage

Information about memory usage to dynamically tune the in-memory sort buffer size.

mergeRunsback to summary
private Vector<Long> mergeRuns

A vector of the conglomerate ids of the merge runs.

runSizeback to summary
private int runSize
sortback to summary
private MergeSort sort

The sort this inserter is for.

sortBufferback to summary
private SortBuffer sortBuffer

An in-memory ordered set that is used to sort rows before they're sent to merge runs.

stat_mergeRunsSizeback to summary
pack-priv Vector<Integer> stat_mergeRunsSize
stat_numMergeRunsback to summary
pack-priv int stat_numMergeRuns
stat_numRowsInputback to summary
pack-priv int stat_numRowsInput
stat_numRowsOutputback to summary
pack-priv int stat_numRowsOutput
stat_sortTypeback to summary
pack-priv String stat_sortType
totalRunSizeback to summary
private int totalRunSize
tranback to summary
private TransactionManager tran

The transaction this inserter is in.

Constructor Detail

MergeInserterback to summary
pack-priv MergeInserter()

Method Detail

completedInsertsback to summary
public void completedInserts()

Implements org.apache.derby.iapi.store.access.SortController.completedInserts.

Called when the caller has completed inserting rows into the sorter.

See Also
SortController#completedInserts
getSortInfoback to summary
public SortInfo getSortInfo() throws StandardException

Implements org.apache.derby.iapi.store.access.SortController.getSortInfo.

Return SortInfo object which contains information about the current sort.

Returns:SortInfo

The SortInfo object which contains info about current sort.

Exceptions
StandardException:
Standard exception policy.
See Also
SortInfo
initializeback to summary
pack-priv boolean initialize(MergeSort sort, TransactionManager tran)

Initialize this inserter.

Returns:boolean

true if initialization was successful

insertback to summary
public void insert(DataValueDescriptor[] row) throws StandardException

Implements org.apache.derby.iapi.store.access.SortController.insert.

Insert a row into the sort.

Parameters
row:DataValueDescriptor[]

Doc from org.apache.derby.iapi.store.access.SortController.insert.

The row to insert into the SortController. The stored representations of the row's columns are copied into a new row somewhere in the sort.

Exceptions
StandardException:

Doc from org.apache.derby.iapi.store.access.SortController.insert.

Standard exception policy.

See Also
SortController#insert