org.apache.derby.impl.store.access.btree.index
Class B2IController

java.lang.Object
  extended byorg.apache.derby.impl.store.access.btree.OpenBTree
      extended byorg.apache.derby.impl.store.access.btree.BTreeController
          extended byorg.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.


Field Summary
private  ConglomerateController base_cc_for_locking
           
 
Fields inherited from class org.apache.derby.impl.store.access.btree.BTreeController
 
Fields 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
(package private) B2IController()
           
 
Method Summary
 void close()
          Close the conglomerate controller.
(package private)  void init(TransactionManager xact_manager, Transaction rawtran, 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, makeRecordHandle, 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 Detail

base_cc_for_locking

private ConglomerateController base_cc_for_locking
Constructor Detail

B2IController

B2IController()
Method Detail

init

void init(TransactionManager xact_manager,
          Transaction rawtran,
          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
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[])

Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.