|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.backends.jeb.DatabaseContainer
org.opends.server.backends.jeb.VLVIndex
public class VLVIndex
This class represents a VLV index. Each database record is a sorted list of entry IDs followed by sets of attribute values used to sort the entries. The entire set of entry IDs are broken up into sorted subsets to decrease the number of database retrivals needed for a range lookup. The records are keyed by the last entry's first sort attribute value. The list of entries in a particular database record maintains the property where the first sort attribute value is bigger then the previous key but smaller or equal to its own key.
Field Summary | |
---|---|
VLVKeyComparator |
comparator
The comparator for vlvIndex keys. |
SortOrder |
sortOrder
The SortOrder in use by this VLV index to sort the entries. |
Fields inherited from class org.opends.server.backends.jeb.DatabaseContainer |
---|
dbConfig, entryContainer, name |
Constructor Summary | |
---|---|
VLVIndex(LocalDBVLVIndexCfg config,
State state,
com.sleepycat.je.Environment env,
EntryContainer entryContainer)
Create a new VLV vlvIndex object. |
Method Summary | |
---|---|
boolean |
addEntry(IndexBuffer buffer,
EntryID entryID,
Entry entry)
Update the vlvIndex for a new entry. |
boolean |
addEntry(com.sleepycat.je.Transaction txn,
EntryID entryID,
Entry entry)
Update the vlvIndex for a new entry. |
ConfigChangeResult |
applyConfigurationChange(LocalDBVLVIndexCfg cfg)
Applies the configuration changes to this change listener. |
void |
close()
Close the VLV index. |
boolean |
containsValues(com.sleepycat.je.Transaction txn,
long entryID,
AttributeValue[] values)
Search for entries matching the entry ID and attribute values and return its entry ID. |
EntryIDSet |
evaluate(com.sleepycat.je.Transaction txn,
SearchOperation searchOperation,
ServerSideSortRequestControl sortControl,
VLVRequestControl vlvRequest,
java.lang.StringBuilder debugBuilder)
Evaluate a search with sort control using this VLV index. |
int |
getSortedSetCapacity()
Get the sorted set capacity configured for this VLV index. |
SortValuesSet |
getSortValuesSet(com.sleepycat.je.Transaction txn,
long entryID,
AttributeValue[] values)
Get a sorted values set that should contain the entry with the given information. |
boolean |
isConfigurationChangeAcceptable(LocalDBVLVIndexCfg cfg,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener. |
boolean |
modifyEntry(IndexBuffer buffer,
EntryID entryID,
Entry oldEntry,
Entry newEntry,
java.util.List<Modification> mods)
Update the vlvIndex to reflect a sequence of modifications in a Modify operation. |
boolean |
modifyEntry(com.sleepycat.je.Transaction txn,
EntryID entryID,
Entry oldEntry,
Entry newEntry,
java.util.List<Modification> mods)
Update the vlvIndex to reflect a sequence of modifications in a Modify operation. |
void |
open()
Opens a JE database in this database container. |
boolean |
putSortValuesSet(com.sleepycat.je.Transaction txn,
SortValuesSet sortValuesSet)
Put a sort values set in this VLV index. |
boolean |
removeEntry(IndexBuffer buffer,
EntryID entryID,
Entry entry)
Update the vlvIndex for a deleted entry. |
boolean |
removeEntry(com.sleepycat.je.Transaction txn,
EntryID entryID,
Entry entry)
Update the vlvIndex for a deleted entry. |
void |
setRebuildStatus(boolean rebuildRunning)
Set the rebuild status of this vlvIndex. |
void |
setTrusted(com.sleepycat.je.Transaction txn,
boolean trusted)
Set the vlvIndex trust state. |
boolean |
shouldInclude(Entry entry)
Indicates if the given entry should belong in this VLV index. |
void |
updateIndex(com.sleepycat.je.Transaction txn,
java.util.TreeSet<SortValues> addedValues,
java.util.TreeSet<SortValues> deletedValues)
Update the vlvIndex with the specified values to add and delete. |
Methods inherited from class org.opends.server.backends.jeb.DatabaseContainer |
---|
delete, getName, getRecordCount, insert, openCursor, preload, put, read, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public VLVKeyComparator comparator
public SortOrder sortOrder
Constructor Detail |
---|
public VLVIndex(LocalDBVLVIndexCfg config, State state, com.sleepycat.je.Environment env, EntryContainer entryContainer) throws com.sleepycat.je.DatabaseException, ConfigException
config
- The VLV index config object to use for this VLV
index.state
- The state database to persist vlvIndex state info.env
- The JE EnvironemntentryContainer
- The database entryContainer holding this vlvIndex.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
ConfigException
- if a error occurs while reading the VLV index
configurationMethod Detail |
---|
public void open() throws com.sleepycat.je.DatabaseException
open
in class DatabaseContainer
com.sleepycat.je.DatabaseException
- if a JE database error occurs while
openning the index.public void close() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- if a JE database error occurs while
closing the index.public boolean addEntry(com.sleepycat.je.Transaction txn, EntryID entryID, Entry entry) throws com.sleepycat.je.DatabaseException, DirectoryException, JebException
txn
- A database transaction, or null if none is required.entryID
- The entry ID.entry
- The entry to be indexed.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
DirectoryException
- If a Directory Server
error occurs.
JebException
- If an error occurs in the JE backend.public boolean addEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws DirectoryException
buffer
- The index buffer to buffer the changes.entryID
- The entry ID.entry
- The entry to be indexed.
DirectoryException
- If a Directory Server
error occurs.public boolean removeEntry(com.sleepycat.je.Transaction txn, EntryID entryID, Entry entry) throws com.sleepycat.je.DatabaseException, DirectoryException, JebException
txn
- The database transaction to be used for the deletionsentryID
- The entry IDentry
- The contents of the deleted entry.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
DirectoryException
- If a Directory Server error occurs.
JebException
- If an error occurs in the JE backend.public boolean removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws DirectoryException
buffer
- The database transaction to be used for the deletionsentryID
- The entry IDentry
- The contents of the deleted entry.
DirectoryException
- If a Directory Server error occurs.public boolean modifyEntry(com.sleepycat.je.Transaction txn, EntryID entryID, Entry oldEntry, Entry newEntry, java.util.List<Modification> mods) throws com.sleepycat.je.DatabaseException, DirectoryException, JebException
txn
- The JE transaction to use for database updates.entryID
- The ID of the entry that was modified.oldEntry
- The entry before the modifications were applied.newEntry
- The entry after the modifications were applied.mods
- The sequence of modifications in the Modify operation.
JebException
- If an error occurs during an operation on a
JE database.
com.sleepycat.je.DatabaseException
- If an error occurs during an operation on a
JE database.
DirectoryException
- If a Directory Server error occurs.public boolean modifyEntry(IndexBuffer buffer, EntryID entryID, Entry oldEntry, Entry newEntry, java.util.List<Modification> mods) throws com.sleepycat.je.DatabaseException, DirectoryException, JebException
buffer
- The database transaction to be used for the deletionsentryID
- The ID of the entry that was modified.oldEntry
- The entry before the modifications were applied.newEntry
- The entry after the modifications were applied.mods
- The sequence of modifications in the Modify operation.
JebException
- If an error occurs during an operation on a
JE database.
com.sleepycat.je.DatabaseException
- If an error occurs during an operation on a
JE database.
DirectoryException
- If a Directory Server error occurs.public boolean putSortValuesSet(com.sleepycat.je.Transaction txn, SortValuesSet sortValuesSet) throws JebException, com.sleepycat.je.DatabaseException, DirectoryException
txn
- The transaction to use when retriving the set or NULL if it is
not required.sortValuesSet
- The SortValuesSet to put.
JebException
- If an error occurs during an operation on a
JE database.
com.sleepycat.je.DatabaseException
- If an error occurs during an operation on a
JE database.
DirectoryException
- If a Directory Server error occurs.public SortValuesSet getSortValuesSet(com.sleepycat.je.Transaction txn, long entryID, AttributeValue[] values) throws com.sleepycat.je.DatabaseException, DirectoryException
txn
- The transaction to use when retriving the set or NULL if it is
not required.entryID
- The entry ID to use.values
- The values to use.
com.sleepycat.je.DatabaseException
- If an error occurs during an operation on a
JE database.
DirectoryException
- If a Directory Server error occurs.public boolean containsValues(com.sleepycat.je.Transaction txn, long entryID, AttributeValue[] values) throws JebException, com.sleepycat.je.DatabaseException, DirectoryException
txn
- The JE transaction to use for database updates.entryID
- The entry ID to search for.values
- The values to search for.
com.sleepycat.je.DatabaseException
- If an error occurs during an operation on a
JE database.
JebException
- If an error occurs during an operation on a
JE database.
DirectoryException
- If a Directory Server error occurs.public void updateIndex(com.sleepycat.je.Transaction txn, java.util.TreeSet<SortValues> addedValues, java.util.TreeSet<SortValues> deletedValues) throws DirectoryException, com.sleepycat.je.DatabaseException, JebException
txn
- A database transaction, or null if none is required.addedValues
- The values to add to the VLV index.deletedValues
- The values to delete from the VLV index.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
DirectoryException
- If a Directory Server
error occurs.
JebException
- If an error occurs in the JE backend.public EntryIDSet evaluate(com.sleepycat.je.Transaction txn, SearchOperation searchOperation, ServerSideSortRequestControl sortControl, VLVRequestControl vlvRequest, java.lang.StringBuilder debugBuilder) throws DirectoryException, com.sleepycat.je.DatabaseException, JebException
txn
- The transaction to used when reading the index or NULL if it is
not required.searchOperation
- The search operation to evaluate.sortControl
- The sort request control to evaluate.vlvRequest
- The VLV request control to evaluate or NULL if VLV is not
requested.debugBuilder
- If not null, a diagnostic string will be written
which will help determine how this index contributed
to this search.
DirectoryException
- If a Directory Server error occurs.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
JebException
- If an error occurs in the JE database.public void setTrusted(com.sleepycat.je.Transaction txn, boolean trusted) throws com.sleepycat.je.DatabaseException
txn
- A database transaction, or null if none is required.trusted
- True if this vlvIndex should be trusted or false
otherwise.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public void setRebuildStatus(boolean rebuildRunning)
rebuildRunning
- True if a rebuild process on this vlvIndex
is running or False otherwise.public int getSortedSetCapacity()
public boolean shouldInclude(Entry entry) throws DirectoryException
entry
- The entry to check.
DirectoryException
- If a Directory Server error occurs.public boolean isConfigurationChangeAcceptable(LocalDBVLVIndexCfg cfg, java.util.List<Message> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<LocalDBVLVIndexCfg>
cfg
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.
true
if the proposed change is
acceptable, or false
if it is not.public ConfigChangeResult applyConfigurationChange(LocalDBVLVIndexCfg cfg)
applyConfigurationChange
in interface ConfigurationChangeListener<LocalDBVLVIndexCfg>
cfg
- The new configuration containing the changes.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |