Search in sources :

Example 1 with Index

use of org.apache.directory.server.xdbm.Index in project aws-iam-ldap-bridge by denismo.

the class ApacheDSUtils method addIndex.

/**
     * Add a new set of index on the given attributes
     *
     * @param partition The partition on which we want to add index
     * @param attrs The list of attributes to index
     */
public void addIndex(Partition partition, String... attrs) {
    // Index some attributes on the apache partition
    Set<Index<?, String>> indexedAttributes = new HashSet<Index<?, String>>();
    for (String attribute : attrs) {
        indexedAttributes.add(new JdbmIndex(attribute, false));
    }
    ((JdbmPartition) partition).setIndexedAttributes(indexedAttributes);
}
Also used : JdbmPartition(org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition) JdbmIndex(org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex) JdbmIndex(org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex) Index(org.apache.directory.server.xdbm.Index) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 JdbmIndex (org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex)1 JdbmPartition (org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition)1 Index (org.apache.directory.server.xdbm.Index)1