public class BasicSortObserver extends java.lang.Object implements SortObserver
Modifier and Type | Field and Description |
---|---|
protected boolean |
distinct |
protected boolean |
doClone |
private ExecRow |
execRow |
private boolean |
reuseWrappers |
private java.util.Vector<DataValueDescriptor[]> |
vector |
Constructor and Description |
---|
BasicSortObserver(boolean doClone,
boolean distinct,
ExecRow execRow,
boolean reuseWrappers)
Simple constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addToFreeList(DataValueDescriptor[] objectArray,
int maxFreeListSize) |
boolean |
deferrable()
Overridden by subclasses that observe sorters with uniqueness checking.
|
boolean |
deferred()
Overridden by subclasses that observe sorters with uniqueness checking.
|
DataValueDescriptor[] |
getArrayClone() |
private DataValueDescriptor[] |
getClone(DataValueDescriptor[] origArray) |
DataValueDescriptor[] |
insertDuplicateKey(DataValueDescriptor[] insertRow,
DataValueDescriptor[] existingRow)
Called prior to inserting a duplicate sort
key.
|
DataValueDescriptor[] |
insertNonDuplicateKey(DataValueDescriptor[] insertRow)
Called prior to inserting a distinct sort
key.
|
void |
rememberDuplicate(DataValueDescriptor[] row)
Overridden by subclasses that observe sorters with uniqueness checking.
|
protected boolean doClone
protected boolean distinct
private boolean reuseWrappers
private ExecRow execRow
private java.util.Vector<DataValueDescriptor[]> vector
public BasicSortObserver(boolean doClone, boolean distinct, ExecRow execRow, boolean reuseWrappers)
doClone
- If true, then rows that are retained
by the sorter will be cloned. This is needed
if language is reusing row wrappers.distinct
- If true, toss out duplicates.
Otherwise, retain them.execRow
- ExecRow to use as source of clone for store.reuseWrappers
- Whether or not we can reuse the wrapperspublic DataValueDescriptor[] insertNonDuplicateKey(DataValueDescriptor[] insertRow) throws StandardException
insertNonDuplicateKey
in interface SortObserver
insertRow
- the current row that the sorter
is on the verge of retainingStandardException
- never thrownpublic DataValueDescriptor[] insertDuplicateKey(DataValueDescriptor[] insertRow, DataValueDescriptor[] existingRow) throws StandardException
insertDuplicateKey
in interface SortObserver
insertRow
- the current row that the sorter
is on the verge of retaining. It is a duplicate
of existingRow.existingRow
- the row that is already in the
the sorter which is a duplicate of insertRowStandardException
- never thrownpublic void addToFreeList(DataValueDescriptor[] objectArray, int maxFreeListSize)
addToFreeList
in interface SortObserver
public DataValueDescriptor[] getArrayClone() throws StandardException
getArrayClone
in interface SortObserver
StandardException
private DataValueDescriptor[] getClone(DataValueDescriptor[] origArray)
public boolean deferred()
SortObserver
deferred
in interface SortObserver
public boolean deferrable()
SortObserver
deferrable
in interface SortObserver
public void rememberDuplicate(DataValueDescriptor[] row) throws StandardException
SortObserver
rememberDuplicate
in interface SortObserver
row
- data of offending keyStandardException
- standard error policyApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.