org.apache.derby.impl.store.access.btree.index
Class B2IController
java.lang.Object
org.apache.derby.impl.store.access.btree.OpenBTree
org.apache.derby.impl.store.access.btree.BTreeController
org.apache.derby.impl.store.access.btree.index.B2IController
- All Implemented Interfaces:
- ConglomerateController, ConglomPropertyQueryable
public class B2IController
- extends BTreeController
Controller used to insert rows into a secondary index.
Implements the ConglomerateController interface for the B-Tree index
access method.
Note most work of this class is inherited from the generic btree
implementation. This class initializes the top level object and deals with
locking information specific to a secondary index implementation of a btree.
Method Summary |
void |
close()
Close the conglomerate controller. |
(package private) void |
init(TransactionManager xact_manager,
Transaction rawtran,
boolean hold,
int open_mode,
int lock_level,
LockingPolicy locking_policy,
boolean get_locks,
B2I conglomerate,
B2IUndo undo,
B2IStaticCompiledInfo static_info,
DynamicCompiledOpenConglomInfo dynamic_info)
|
int |
insert(DataValueDescriptor[] row)
Insert a row into the conglomerate. |
Methods inherited from class org.apache.derby.impl.store.access.btree.BTreeController |
closeForEndTransaction, delete, fetch, fetch, getInternalTablePropertySet, getTableProperties, init, insertAndFetchLocation, isKeyed, load, lockRow, lockRow, newRowLocationTemplate, replace, unlockRowAfterRead |
Methods inherited from class org.apache.derby.impl.store.access.btree.OpenBTree |
checkConsistency, debugConglomerate, getColumnSortOrderInfo, getConglomerate, getContainer, getContainerHandle, getEstimatedRowCount, getHeight, getHold, getLockingPolicy, getLockLevel, getOpenMode, getRawTran, getRuntimeMem, getSpaceInfo, getXactMgr, init, isClosed, isTableLocked, reopen, setEstimatedRowCount, setLockingPolicy, test_errors |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
base_cc_for_locking
private ConglomerateController base_cc_for_locking
B2IController
B2IController()
init
void init(TransactionManager xact_manager,
Transaction rawtran,
boolean hold,
int open_mode,
int lock_level,
LockingPolicy locking_policy,
boolean get_locks,
B2I conglomerate,
B2IUndo undo,
B2IStaticCompiledInfo static_info,
DynamicCompiledOpenConglomInfo dynamic_info)
throws StandardException
- Throws:
StandardException
close
public void close()
throws StandardException
- Close the conglomerate controller.
Any changes to this method will probably have to be reflected in close as
well.
Currently delegates to OpenBTree. If the btree controller ends up not
having any state of its own, we can remove this method (the VM will
dispatch to OpenBTree), gaining some small efficiency. For now, this
method remains for clarity.
- Specified by:
close
in interface ConglomerateController
- Overrides:
close
in class BTreeController
- Throws:
StandardException
- Standard exception policy.- See Also:
ConglomerateController.close()
insert
public int insert(DataValueDescriptor[] row)
throws StandardException
- Insert a row into the conglomerate.
- Specified by:
insert
in interface ConglomerateController
- Overrides:
insert
in class BTreeController
- Parameters:
row
- The row to insert into the conglomerate. The stored
representations of the row's columns are copied into a new row
somewhere in the conglomerate.
- Returns:
- Returns 0 if insert succeeded. Returns
ConglomerateController.ROWISDUPLICATE if conglomerate supports uniqueness
checks and has been created to disallow duplicates, and the row inserted
had key columns which were duplicate of a row already in the table. Other
insert failures will raise StandardException's.
- Throws:
StandardException
- Standard exception policy.- See Also:
ConglomerateController.insert(org.apache.derby.iapi.types.DataValueDescriptor[])
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.