Class MergeInserter
java.lang.Object
org.apache.derby.impl.store.access.sort.MergeInserter
- All Implemented Interfaces:
SortController
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private long
Information about memory usage to dynamically tune the in-memory sort buffer size.A vector of the conglomerate ids of the merge runs.private int
private MergeSort
The sort this inserter is for.private SortBuffer
An 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) String
private int
private TransactionManager
The transaction this inserter is in. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when the caller has completed inserting rows into the sorter.Return SortInfo object which contains information about the current sort.(package private) boolean
initialize
(MergeSort sort, TransactionManager tran) Initialize this inserter.void
insert
(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
A vector of the conglomerate ids of the merge runs. -
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:
insert
in 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:
completedInserts
in interfaceSortController
- See Also:
-
getSortInfo
Return SortInfo object which contains information about the current sort.- Specified by:
getSortInfo
in 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
-