|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.execute.IndexChanger
Perform Index maintenace associated with DML operations for a single index.
Field Summary | |
private Activation |
activation
|
private ConglomerateController |
baseCC
|
private FormatableBitSet |
baseRowReadMap
|
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
|
Constructor Summary | |
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 |
Method Summary | |
void |
close()
Close this IndexChanger. |
private void |
closeIndexCC()
Close our index Conglomerate Controller |
private void |
closeIndexSC()
Close our index ScanController. |
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 This opens our deferred ConglomeratController the first time it is called. |
private void |
doDelete()
Delete a row from our index. |
private void |
doInsert()
Insert a row into our indes. |
void |
finish()
Finish doing the changes for this index. |
private ExecIndexRow |
getDeferredIndexRowTemplate(ExecRow baseRow,
RowLocation baseRowLoc)
|
private boolean |
indexRowChanged()
Determine whether or not any columns in the current index row are being changed by the update. |
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. |
void |
open()
Open this IndexChanger. |
private ConglomerateController |
openIndexCC()
Open the ConglomerateController for this index if it isn't open yet. |
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. |
void |
setRowHolder(TemporaryRowHolderImpl rowHolder)
Set the row holder for this changer to use. |
private void |
setScan()
Position our index scan to 'ourIndexRow'. |
void |
update(ExecRow oldBaseRow,
ExecRow newBaseRow,
RowLocation baseRowLocation)
Perform index maintenance to support an update of a base table row. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private IndexRowGenerator irg
private long indexCID
private DynamicCompiledOpenConglomInfo indexDCOCI
private StaticCompiledOpenConglomInfo indexSCOCI
private java.lang.String indexName
private ConglomerateController baseCC
private TransactionController tc
private int lockMode
private FormatableBitSet baseRowReadMap
private ConglomerateController indexCC
private ScanController indexSC
private LanguageConnectionContext lcc
private ExecIndexRow ourIndexRow
private ExecIndexRow ourUpdatedIndexRow
private TemporaryRowHolderImpl rowHolder
private boolean rowHolderPassedIn
private int isolationLevel
private Activation activation
private boolean ownIndexSC
Constructor Detail |
public 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 idexes.indexDCOCI
- the DCOCI for the idexes.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 activation
StandardException
- Thrown on errorMethod Detail |
public void setRowHolder(TemporaryRowHolderImpl rowHolder)
rowHolder
- the row holderpublic void 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 location
StandardException
- Thrown on errorprivate void setOurUpdatedIndexRow(ExecRow baseRow, RowLocation baseRowLoc) throws StandardException
baseRow
- a base table row.baseRowLoc
- baseRowLoc baseRow's location
StandardException
- Thrown on errorprivate boolean indexRowChanged() throws StandardException
StandardException
- Thrown on errorprivate ExecIndexRow getDeferredIndexRowTemplate(ExecRow baseRow, RowLocation baseRowLoc) throws StandardException
StandardException
private 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 void insertAndCheckDups(ExecIndexRow row) throws StandardException
row
- The row to insert
StandardException
- Thrown on duplicate key errorprivate ConglomerateController openIndexCC() throws StandardException
StandardException
- Thrown on duplicate key errorpublic void open() throws StandardException
StandardException
- Thrown on errorpublic void delete(ExecRow baseRow, RowLocation baseRowLocation) throws StandardException
baseRow
- the base table row.baseRowLocation
- the base table row's location.
StandardException
- Thrown on errorpublic void 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 errorpublic void insert(ExecRow newRow, RowLocation baseRowLocation) throws StandardException
baseRowLocation
- the base table row's location.
StandardException
- Thrown on errorvoid insertForUpdate(ExecRow newRow, RowLocation baseRowLocation) throws StandardException
baseRowLocation
- the base table row's location.
StandardException
- Thrown on errorpublic void finish() throws StandardException
StandardException
- Thrown on errorpublic void close() throws StandardException
StandardException
- Thrown on error
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |