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
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.
-
Field Summary
FieldsFields inherited from class org.apache.derby.impl.store.access.btree.OpenBTree
btree_undo, container, err_containerid, init_lock_level, init_open_user_scans, runtime_mem
Fields inherited from interface org.apache.derby.iapi.store.access.ConglomerateController
LOCK_INS, LOCK_INS_PREVKEY, LOCK_READ, LOCK_UPD, LOCK_UPDATE_LOCKS, ROWISDUPLICATE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Methods inherited from interface org.apache.derby.iapi.store.access.ConglomerateController
checkConsistency, debugConglomerate, getSpaceInfo
-
Field Details
-
base_cc_for_locking
-
-
Constructor Details
-
B2IController
B2IController()
-
-
Method Details
-
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
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 interfaceConglomerateController
- Overrides:
close
in classBTreeController
- Throws:
StandardException
- Standard exception policy.- See Also:
-
insert
Insert a row into the conglomerate.- Specified by:
insert
in interfaceConglomerateController
- Overrides:
insert
in classBTreeController
- 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:
-