public class Index extends DatabaseContainer
dbConfig, entryContainer, name
Modifier and Type | Method and Description |
---|---|
void |
addEntry(IndexBuffer buffer,
EntryID entryID,
Entry entry)
Update the index buffer for a deleted entry.
|
org.forgerock.opendj.ldap.ConditionResult |
containsID(com.sleepycat.je.Transaction txn,
com.sleepycat.je.DatabaseEntry key,
EntryID entryID)
Check if an entry ID is in the set of IDs indexed by a given key.
|
void |
delete(com.sleepycat.je.DatabaseEntry key,
org.opends.server.backends.jeb.ImportIDSet importIdSet,
com.sleepycat.je.DatabaseEntry data)
Delete the specified import ID set from the import ID set associated with the key.
|
void |
delete(IndexBuffer buffer,
org.forgerock.opendj.ldap.ByteString keyBytes)
Buffered delete of a key from the JE database.
|
Comparator<byte[]> |
getComparator()
Return an indexes comparator.
|
int |
getEntryLimitExceededCount()
Get the number of keys that have exceeded the entry limit since this
object was created.
|
int |
getIndexEntryLimit()
Return entry limit.
|
boolean |
getMaintainCount()
Whether this index maintains a count of IDs for keys once the
entry limit has exceeded.
|
void |
insert(com.sleepycat.je.DatabaseEntry key,
org.opends.server.backends.jeb.ImportIDSet importIdSet,
com.sleepycat.je.DatabaseEntry data)
Insert the specified import ID set into this index.
|
boolean |
isRebuildRunning()
Return
true iff this index is being rebuilt. |
boolean |
isTrusted()
Return true iff this index is trusted.
|
void |
modifyEntry(IndexBuffer buffer,
EntryID entryID,
Entry oldEntry,
Entry newEntry,
List<Modification> mods)
Update the index to reflect a sequence of modifications in a Modify
operation.
|
EntryIDSet |
readKey(com.sleepycat.je.DatabaseEntry key,
com.sleepycat.je.Transaction txn,
com.sleepycat.je.LockMode lockMode)
Reads the set of entry IDs for a given key.
|
EntryIDSet |
readRange(byte[] lower,
byte[] upper,
boolean lowerIncluded,
boolean upperIncluded)
Reads a range of keys and collects all their entry IDs into a
single set.
|
void |
removeEntry(IndexBuffer buffer,
EntryID entryID,
Entry entry)
Update the index buffer for a deleted entry.
|
boolean |
setIndexEntryLimit(int indexEntryLimit)
Set the index entry limit.
|
void |
setIndexer(Indexer indexer)
Set the indexer.
|
void |
setTrusted(com.sleepycat.je.Transaction txn,
boolean trusted)
Set the index trust state.
|
void |
writeKey(com.sleepycat.je.Transaction txn,
com.sleepycat.je.DatabaseEntry key,
EntryIDSet entryIDList)
Writes the set of entry IDs for a given key.
|
close, getName, getRecordCount, open, openCursor, openCursor, preload, toString
public void delete(com.sleepycat.je.DatabaseEntry key, org.opends.server.backends.jeb.ImportIDSet importIdSet, com.sleepycat.je.DatabaseEntry data) throws com.sleepycat.je.DatabaseException
key
- The key to delete the set from.importIdSet
- The import ID set to delete.data
- A database entry to use for data.com.sleepycat.je.DatabaseException
- If a database error occurs.public void insert(com.sleepycat.je.DatabaseEntry key, org.opends.server.backends.jeb.ImportIDSet importIdSet, com.sleepycat.je.DatabaseEntry data) throws com.sleepycat.je.DatabaseException
key
- The key to add the set to.importIdSet
- The set of import IDs.data
- Database entry to reuse for read.com.sleepycat.je.DatabaseException
- If a database error occurs.public void delete(IndexBuffer buffer, org.forgerock.opendj.ldap.ByteString keyBytes)
buffer
- The index buffer to use to store the deleted keyskeyBytes
- The index key bytes.public org.forgerock.opendj.ldap.ConditionResult containsID(com.sleepycat.je.Transaction txn, com.sleepycat.je.DatabaseEntry key, EntryID entryID) throws com.sleepycat.je.DatabaseException
txn
- A database transaction, or null if none is required.key
- The index key.entryID
- The entry ID.com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public EntryIDSet readKey(com.sleepycat.je.DatabaseEntry key, com.sleepycat.je.Transaction txn, com.sleepycat.je.LockMode lockMode)
key
- The database key.txn
- A database transaction, or null if none is required.lockMode
- The JE locking mode to be used for the database read.public void writeKey(com.sleepycat.je.Transaction txn, com.sleepycat.je.DatabaseEntry key, EntryIDSet entryIDList) throws com.sleepycat.je.DatabaseException
key
- The database key.entryIDList
- The entry IDs indexed by this key.txn
- A database transaction, or null if none is required.com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public EntryIDSet readRange(byte[] lower, byte[] upper, boolean lowerIncluded, boolean upperIncluded)
lower
- The lower bound of the range. A 0 length byte array indicates
no lower bound and the range will start from the
smallest key.upper
- The upper bound of the range. A 0 length byte array indicates
no upper bound and the range will end at the largest
key.lowerIncluded
- true if a key exactly matching the lower bound
is included in the range, false if only keys
strictly greater than the lower bound are included.
This value is ignored if the lower bound is not
specified.upperIncluded
- true if a key exactly matching the upper bound
is included in the range, false if only keys
strictly less than the upper bound are included.
This value is ignored if the upper bound is not
specified.public int getEntryLimitExceededCount()
public void addEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws com.sleepycat.je.DatabaseException, DirectoryException
buffer
- The index buffer to use to store the deleted keysentryID
- 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.public void removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws com.sleepycat.je.DatabaseException, DirectoryException
buffer
- The index buffer to use to store the deleted keysentryID
- 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.public void modifyEntry(IndexBuffer buffer, EntryID entryID, Entry oldEntry, Entry newEntry, List<Modification> mods) throws com.sleepycat.je.DatabaseException
buffer
- The index buffer to use to store the deleted keysentryID
- 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.com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public boolean setIndexEntryLimit(int indexEntryLimit)
indexEntryLimit
- The index entry limit to set.public void setIndexer(Indexer indexer)
indexer
- The indexer to setpublic int getIndexEntryLimit()
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 index should be trusted or false
otherwise.com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public boolean isTrusted()
public boolean isRebuildRunning()
true
iff this index is being rebuilt.public boolean getMaintainCount()
true
if this index maintains court of IDs
or false
otherwisepublic Comparator<byte[]> getComparator()
Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.