Represents a Berkeley DB secondary index. An index is always attached to a single {@link DataStore} when it is constructed. An index is typicallyaccessed by passing it to the constructor of one of the collection classes in the {@link com.sleepycat.bdb.collection} package. For example:
Db db = new Db(env, 0); db.setFlags(Db.DB_DUPSORT); db.open(null, "index.db", null, Db.DB_BTREE, dbOpenFlags, 0); DataIndex index = new DataIndex(store, db, keyFormat, keyExtractor); StoredMap map = new StoredMap(index, keyBinding, valueBinding, writeAllowed);
All access methods may be used with BDB. However, some access methods may only be used with certain types of collection views, and some access methods impose restrictions on the way collection views are used.
@author Mark Hayes