Class MergeInserter
java.lang.Object
org.apache.derby.impl.store.access.sort.MergeInserter
- All Implemented Interfaces:
SortController
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate longInformation about memory usage to dynamically tune the in-memory sort buffer size.A vector of the conglomerate ids of the merge runs.private intprivate MergeSortThe sort this inserter is for.private SortBufferAn in-memory ordered set that is used to sort rows before they're sent to merge runs.(package private) int(package private) int(package private) int(package private) Stringprivate intprivate TransactionManagerThe transaction this inserter is in. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the caller has completed inserting rows into the sorter.Return SortInfo object which contains information about the current sort.(package private) booleaninitialize(MergeSort sort, TransactionManager tran) Initialize this inserter.voidinsert(DataValueDescriptor[] row) Insert a row into the sort.
-
Field Details
-
sort
The sort this inserter is for. -
tran
The transaction this inserter is in. -
mergeRuns
-
sortBuffer
An in-memory ordered set that is used to sort rows before they're sent to merge runs. -
beginMemoryUsage
private long beginMemoryUsageInformation about memory usage to dynamically tune the in-memory sort buffer size. -
avoidMergeRun
private boolean avoidMergeRun -
runSize
private int runSize -
totalRunSize
private int totalRunSize -
stat_sortType
String stat_sortType -
stat_numRowsInput
int stat_numRowsInput -
stat_numRowsOutput
int stat_numRowsOutput -
stat_numMergeRuns
int stat_numMergeRuns -
stat_mergeRunsSize
-
-
Constructor Details
-
MergeInserter
MergeInserter()
-
-
Method Details
-
insert
Insert a row into the sort.- Specified by:
insertin interfaceSortController- Parameters:
row- 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.- Throws:
StandardException- Standard exception policy.- See Also:
-
completedInserts
public void completedInserts()Called when the caller has completed inserting rows into the sorter.- Specified by:
completedInsertsin interfaceSortController- See Also:
-
getSortInfo
Return SortInfo object which contains information about the current sort.- Specified by:
getSortInfoin interfaceSortController- Returns:
- The SortInfo object which contains info about current sort.
- Throws:
StandardException- Standard exception policy.- See Also:
-
initialize
Initialize this inserter.- Returns:
- true if initialization was successful
-