|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.farrago.ddl.DdlReloadTableStmt.ReloadTableIndexMap
private class DdlReloadTableStmt.ReloadTableIndexMap
A special index map used when rebuildIndexes=true. This index map overrides index roots for writes, allowing reload queries such as:
"insert into t select * from t"to copy data from old roots to new roots.
| Field Summary | |
|---|---|
private FarragoSessionIndexMap |
internalMap
|
private Map<String,Long> |
writeIndexMap
|
| Constructor Summary | |
|---|---|
DdlReloadTableStmt.ReloadTableIndexMap(FarragoSessionIndexMap internalMap,
Map<String,Long> writeIndexMap)
Constructs a ReloadTableIndexMap as a wrapper around a standard index map. |
|
| Method Summary | |
|---|---|
FarragoMedLocalIndexStats |
computeIndexStats(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index,
boolean estimate)
Verifies an index and records returns page count for the index. |
void |
createIndexStorage(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index)
Creates an index and records its root in this map. |
long |
createIndexStorage(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index,
boolean updateMap)
Creates an index and optionally records its root in this map. |
void |
dropIndexStorage(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index,
boolean truncate)
Drops an index and removes its root from this map. |
void |
dropIndexStorage(FarragoDataWrapperCache wrapperCache,
String indexMofId,
boolean truncate)
Drops an index by MOFID and removes its root from this map. |
FemLocalIndex |
getIndexById(long id)
Gets an index by its repository ID. |
long |
getIndexRoot(FemLocalIndex index)
Gets the root PageId of an index to be used for reading. |
long |
getIndexRoot(FemLocalIndex index,
boolean write)
Gets the root PageId of an index to be used for reading or for writing. |
CwmTable |
getOldTableStructure()
For ALTER TABLE ADD COLUMN, retrieves the old table structure corresponding to the table being modified. |
CwmTable |
getReloadTable()
For ALTER TABLE ADD COLUMN or REBUILD, retrieves the target table. |
void |
instantiateTemporaryTable(FarragoDataWrapperCache wrapperCache,
CwmTable table)
Called on every reference to a temporary table. |
void |
onCommit()
Commit hook. |
void |
setIndexRoot(FemLocalIndex index,
long pageId)
Sets the root PageId of an index. |
void |
versionIndexRoot(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index,
Long newRoot)
Versions an index root page. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private FarragoSessionIndexMap internalMap
private Map<String,Long> writeIndexMap
| Constructor Detail |
|---|
public DdlReloadTableStmt.ReloadTableIndexMap(FarragoSessionIndexMap internalMap,
Map<String,Long> writeIndexMap)
internalMap - the original index mapwriteIndexMap - a mapping of roots to be returned for writes| Method Detail |
|---|
public FemLocalIndex getIndexById(long id)
FarragoSessionIndexMap
getIndexById in interface FarragoSessionIndexMapid - index ID in repository
public long getIndexRoot(FemLocalIndex index)
FarragoSessionIndexMap
getIndexRoot in interface FarragoSessionIndexMapindex - the index of interest
public long getIndexRoot(FemLocalIndex index,
boolean write)
FarragoSessionIndexMap
getIndexRoot in interface FarragoSessionIndexMapindex - the index of interestwrite - whether to access a root for reading or writing. A root for
reading reflects the index before modifications. A root for writing may
be the same root, or may reflect an updated index, depending on the
implementation of the session index map.
public void setIndexRoot(FemLocalIndex index,
long pageId)
FarragoSessionIndexMap
setIndexRoot in interface FarragoSessionIndexMapindex - the index to be updatedpageId - the root PageId
public void instantiateTemporaryTable(FarragoDataWrapperCache wrapperCache,
CwmTable table)
FarragoSessionIndexMap
instantiateTemporaryTable in interface FarragoSessionIndexMapwrapperCache - cache for looking up data wrapperstable - the temporary tablepublic CwmTable getReloadTable()
FarragoSessionIndexMap
getReloadTable in interface FarragoSessionIndexMappublic CwmTable getOldTableStructure()
FarragoSessionIndexMap
getOldTableStructure in interface FarragoSessionIndexMap
public void createIndexStorage(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index)
FarragoSessionIndexMap
createIndexStorage in interface FarragoSessionIndexMapwrapperCache - cache for looking up data wrappersindex - the index to create
public long createIndexStorage(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index,
boolean updateMap)
FarragoSessionIndexMap
createIndexStorage in interface FarragoSessionIndexMapwrapperCache - cache for looking up data wrappersindex - the index to createupdateMap - whether to record the new root in the map
public void dropIndexStorage(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index,
boolean truncate)
FarragoSessionIndexMap
dropIndexStorage in interface FarragoSessionIndexMapwrapperCache - cache for looking up data wrappersindex - the index to droptruncate - if true, only truncate storage; if false, drop storage
entirely
public void dropIndexStorage(FarragoDataWrapperCache wrapperCache,
String indexMofId,
boolean truncate)
FarragoSessionIndexMap
dropIndexStorage in interface FarragoSessionIndexMapwrapperCache - cache for looking up data wrappersindexMofId - MOFID of the index to droptruncate - if true, only truncate storage; if false, drop storage
entirely
public FarragoMedLocalIndexStats computeIndexStats(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index,
boolean estimate)
FarragoSessionIndexMap
computeIndexStats in interface FarragoSessionIndexMapwrapperCache - cache for looking up data wrappersindex - the index to verify
public void onCommit()
FarragoSessionIndexMap
onCommit in interface FarragoSessionIndexMap
public void versionIndexRoot(FarragoDataWrapperCache wrapperCache,
FemLocalIndex index,
Long newRoot)
FarragoSessionIndexMap
versionIndexRoot in interface FarragoSessionIndexMapwrapperCache - Wrapper cacheindex - Index definitionnewRoot - new index root ids
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||