Skip navigation links

Package org.apache.derby.impl.store.access.btree.index

Implements classes used by the language layer to implement SQL secondary indexes.

See: Description

Package org.apache.derby.impl.store.access.btree.index Description

Implements classes used by the language layer to implement SQL secondary indexes. The classes here extend and use the classes in org.apache.derby.impl.store.access.btree to implement a locked btree index.

The key to understanding the class layout is to understand the public store interfaces in org.apache.derby.iapi.store.access.conglomerate, which contains the shared interfaces that must be implemented by all access methods. Currently Derby implements heap and btree index access methods. Users of access methods use the same interface no matter what the underlying type or particular implementation of the access method. Therefore, Derby can support multiple types of btree index implementations, which if done right should require no changes to actual users of the access methods.

In reality the interfaces would have to change in some ways to support a radically different kind of access method, such as GiST. But the implementor should enhance the interfaces in the conglomerate package so that these can then be supported by all existing access methods.

Isolation Levels

Isolation level implementation in the B-Tree index is done with data only locking, i.e., locks on secondary index rows are actually locks on the data rows that they point to. The specifics of particular isolation levels are hidden in various implementations of the BTreeLockingPolicy class. The classes which do scans, deletes, and inserts do not have isolation specific code, instead they make lock calls using BTreeLockingPolicy interfaces, and then depending on the isolation level one of the implmentations does the actual locking.

Skip navigation links
Built on Tue 1970-01-20 05:28:49+0000, from revision ???

Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.