class IndexChanger
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
private Activation |
activation |
|
private ConglomerateController |
baseCC |
|
private FormatableBitSet |
baseRowReadMap |
|
private boolean |
deferrable |
|
private BackingStoreHashtable |
deferredDuplicates |
|
private ConglomerateController |
indexCC |
|
private long |
indexCID |
|
private DynamicCompiledOpenConglomInfo |
indexDCOCI |
|
private java.lang.String |
indexName |
|
private ScanController |
indexSC |
|
private StaticCompiledOpenConglomInfo |
indexSCOCI |
|
private IndexRowGenerator |
irg |
|
private int |
isolationLevel |
|
private LanguageConnectionContext |
lcc |
|
private int |
lockMode |
|
private ExecIndexRow |
ourIndexRow |
|
private ExecIndexRow |
ourUpdatedIndexRow |
|
private boolean |
ownIndexSC |
|
private TemporaryRowHolderImpl |
rowHolder |
|
private boolean |
rowHolderPassedIn |
|
private TransactionController |
tc |
|
private UUID |
uniqueConstraintId |
Constructor | Description |
---|---|
IndexChanger(IndexRowGenerator irg,
long indexCID,
StaticCompiledOpenConglomInfo indexSCOCI,
DynamicCompiledOpenConglomInfo indexDCOCI,
java.lang.String indexName,
ConglomerateController baseCC,
TransactionController tc,
int lockMode,
FormatableBitSet baseRowReadMap,
int isolationLevel,
Activation activation) |
Create an IndexChanger
|
Modifier and Type | Method | Description |
---|---|---|
(package private) void |
close() |
Close this IndexChanger.
|
private void |
closeIndexCC() |
Close our index Conglomerate Controller
|
private void |
closeIndexSC() |
Close our index ScanController.
|
(package private) void |
delete(ExecRow baseRow,
RowLocation baseRowLocation) |
Perform index maintenance to support a delete of a base table row.
|
private void |
doDeferredInsert() |
Insert a row into the temporary conglomerate
|
private void |
doDelete() |
Delete a row from our index.
|
private void |
doInsert() |
Insert a row into our indes.
|
(package private) void |
finish() |
Finish doing the changes for this index.
|
private UUID |
getUniqueConstraintId() |
|
private boolean |
indexRowChanged() |
Determine whether or not any columns in the current index
row are being changed by the update.
|
(package private) void |
insert(ExecRow newRow,
RowLocation baseRowLocation) |
Perform index maintenance to support an insert of a base table row.
|
private void |
insertAndCheckDups(ExecIndexRow row) |
Insert the given row into the given conglomerate and check for duplicate
key error.
|
(package private) void |
insertForUpdate(ExecRow newRow,
RowLocation baseRowLocation) |
If we're updating a unique index, the inserts have to be
deferred.
|
(package private) void |
open() |
Open this IndexChanger.
|
private ConglomerateController |
openIndexCC() |
Open the ConglomerateController for this index if it isn't open yet.
|
(package private) void |
setBaseCC(ConglomerateController baseCC) |
Propagate the heap's ConglomerateController to
this index changer.
|
private void |
setOurIndexRow(ExecRow baseRow,
RowLocation baseRowLoc) |
Set the column values for 'ourIndexRow' to refer to
a base table row and location provided by the caller.
|
private void |
setOurUpdatedIndexRow(ExecRow baseRow,
RowLocation baseRowLoc) |
Set the column values for 'ourUpdatedIndexRow' to refer to
a base table row and location provided by the caller.
|
(package private) void |
setRowHolder(TemporaryRowHolderImpl rowHolder) |
Set the row holder for this changer to use.
|
private void |
setScan() |
Position our index scan to 'ourIndexRow'.
|
(package private) void |
update(ExecRow oldBaseRow,
ExecRow newBaseRow,
RowLocation baseRowLocation) |
Perform index maintenance to support an update of a base table row.
|
private final IndexRowGenerator irg
private final long indexCID
private final DynamicCompiledOpenConglomInfo indexDCOCI
private final StaticCompiledOpenConglomInfo indexSCOCI
private final java.lang.String indexName
private ConglomerateController baseCC
private final TransactionController tc
private final int lockMode
private final FormatableBitSet baseRowReadMap
private ConglomerateController indexCC
private ScanController indexSC
private ExecIndexRow ourIndexRow
private ExecIndexRow ourUpdatedIndexRow
private TemporaryRowHolderImpl rowHolder
private boolean rowHolderPassedIn
private int isolationLevel
private final Activation activation
private boolean ownIndexSC
private final boolean deferrable
private final LanguageConnectionContext lcc
private BackingStoreHashtable deferredDuplicates
private UUID uniqueConstraintId
IndexChanger(IndexRowGenerator irg, long indexCID, StaticCompiledOpenConglomInfo indexSCOCI, DynamicCompiledOpenConglomInfo indexDCOCI, java.lang.String indexName, ConglomerateController baseCC, TransactionController tc, int lockMode, FormatableBitSet baseRowReadMap, int isolationLevel, Activation activation) throws StandardException
irg
- the IndexRowGenerator for the index.indexCID
- the conglomerate id for the index.indexSCOCI
- the SCOCI for the indexes.indexDCOCI
- the DCOCI for the indexes.baseCC
- the ConglomerateController for the base table.tc
- The TransactionControllerlockMode
- The lock mode (granularity) to usebaseRowReadMap
- Map of columns read in. 1 based.isolationLevel
- Isolation level to use.activation
- Current activationStandardException
- Thrown on errorvoid setRowHolder(TemporaryRowHolderImpl rowHolder)
rowHolder
- the row holdervoid setBaseCC(ConglomerateController baseCC)
baseCC
- The heap's ConglomerateController.private void setOurIndexRow(ExecRow baseRow, RowLocation baseRowLoc) throws StandardException
baseRow
- a base table row.baseRowLoc
- baseRowLoc baseRow's locationStandardException
- Thrown on errorprivate void setOurUpdatedIndexRow(ExecRow baseRow, RowLocation baseRowLoc) throws StandardException
baseRow
- a base table row.baseRowLoc
- baseRowLoc baseRow's locationStandardException
- Thrown on errorprivate boolean indexRowChanged() throws StandardException
StandardException
- Thrown on errorprivate void setScan() throws StandardException
This creates the scan the first time it is called.
StandardException
- Thrown on errorprivate void closeIndexCC() throws StandardException
StandardException
private void closeIndexSC() throws StandardException
StandardException
private void doDelete() throws StandardException
This verifies the row exists and is unique.
StandardException
- Thrown on errorprivate void doInsert() throws StandardException
This opens our index ConglomeratController the first time it is called.
StandardException
- Thrown on errorprivate void doDeferredInsert() throws StandardException
This opens our deferred ConglomeratController the first time it is called.
StandardException
- Thrown on errorprivate UUID getUniqueConstraintId() throws StandardException
StandardException
private void insertAndCheckDups(ExecIndexRow row) throws StandardException
row
- The row to insertStandardException
- Thrown on duplicate key error unless
we have a deferred constraint. In that
index rows are saved for checking
on commit.private ConglomerateController openIndexCC() throws StandardException
StandardException
- Thrown on duplicate key errorvoid open() throws StandardException
StandardException
- Thrown on errorvoid delete(ExecRow baseRow, RowLocation baseRowLocation) throws StandardException
baseRow
- the base table row.baseRowLocation
- the base table row's location.StandardException
- Thrown on errorvoid update(ExecRow oldBaseRow, ExecRow newBaseRow, RowLocation baseRowLocation) throws StandardException
oldBaseRow
- the old image of the base table row.newBaseRow
- the new image of the base table row.baseRowLocation
- the base table row's location.StandardException
- Thrown on errorvoid insert(ExecRow newRow, RowLocation baseRowLocation) throws StandardException
newRow
- the base table row.baseRowLocation
- the base table row's location.StandardException
- Thrown on errorvoid insertForUpdate(ExecRow newRow, RowLocation baseRowLocation) throws StandardException
newRow
- the base table row.baseRowLocation
- the base table row's location.StandardException
- Thrown on errorvoid finish() throws StandardException
StandardException
- Thrown on errorvoid close() throws StandardException
StandardException
- Thrown on errorApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.