| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.config.server.ConfigChangeResult; |
| | | import org.forgerock.opendj.config.server.ConfigException; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.forgerock.opendj.config.server.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | |
| | | * @throws ConfigException if a error occurs while reading the VLV index |
| | | * configuration |
| | | */ |
| | | public VLVIndex(LocalDBVLVIndexCfg config, State state, Environment env, |
| | | EntryContainer entryContainer) |
| | | VLVIndex(LocalDBVLVIndexCfg config, State state, Environment env, EntryContainer entryContainer) |
| | | throws DatabaseException, ConfigException |
| | | { |
| | | super(entryContainer.getDatabasePrefix()+"_vlv."+config.getName(), |
| | |
| | | * @throws DirectoryException If a Directory Server |
| | | * error occurs. |
| | | */ |
| | | public boolean addEntry(IndexBuffer buffer, EntryID entryID, Entry entry) |
| | | throws DirectoryException |
| | | boolean addEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws DirectoryException |
| | | { |
| | | if (shouldInclude(entry)) |
| | | { |
| | |
| | | * or False otherwise. |
| | | * @throws DirectoryException If a Directory Server error occurs. |
| | | */ |
| | | public boolean removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry) |
| | | throws DirectoryException |
| | | boolean removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws DirectoryException |
| | | { |
| | | if (shouldInclude(entry)) |
| | | { |
| | |
| | | * JE database. |
| | | * @throws DirectoryException If a Directory Server error occurs. |
| | | */ |
| | | public boolean modifyEntry(IndexBuffer buffer, |
| | | boolean modifyEntry(IndexBuffer buffer, |
| | | EntryID entryID, |
| | | Entry oldEntry, |
| | | Entry newEntry, |
| | |
| | | * JE database. |
| | | * @throws DirectoryException If a Directory Server error occurs. |
| | | */ |
| | | public SortValuesSet getSortValuesSet(Transaction txn, long entryID, |
| | | SortValuesSet getSortValuesSet(Transaction txn, long entryID, |
| | | ByteString[] values, AttributeType[] types) throws DatabaseException, |
| | | DirectoryException |
| | | { |
| | |
| | | * JE database. |
| | | * @throws DirectoryException If a Directory Server error occurs. |
| | | */ |
| | | public boolean containsValues(Transaction txn, long entryID, |
| | | boolean containsValues(Transaction txn, long entryID, |
| | | ByteString[] values, AttributeType[] types) throws JebException, |
| | | DatabaseException, DirectoryException |
| | | { |
| | |
| | | * @throws DirectoryException If a Directory Server |
| | | * error occurs. |
| | | */ |
| | | public void updateIndex(Transaction txn, |
| | | TreeSet<SortValues> addedValues, |
| | | TreeSet<SortValues> deletedValues) |
| | | void updateIndex(Transaction txn, TreeSet<SortValues> addedValues, TreeSet<SortValues> deletedValues) |
| | | throws DirectoryException, DatabaseException |
| | | { |
| | | // Handle cases where nothing is changed early to avoid |
| | |
| | | * @throws DirectoryException If a Directory Server error occurs. |
| | | * @throws DatabaseException If an error occurs in the JE database. |
| | | */ |
| | | public EntryIDSet evaluate(Transaction txn, |
| | | EntryIDSet evaluate(Transaction txn, |
| | | SearchOperation searchOperation, |
| | | ServerSideSortRequestControl sortControl, |
| | | VLVRequestControl vlvRequest, |
| | |
| | | * otherwise. |
| | | * @throws DirectoryException If a Directory Server error occurs. |
| | | */ |
| | | public boolean shouldInclude(Entry entry) throws DirectoryException |
| | | boolean shouldInclude(Entry entry) throws DirectoryException |
| | | { |
| | | DN entryDN = entry.getName(); |
| | | return entryDN.matchesBaseAndScope(baseDN, scope) |