001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.opends.server.admin.std.server;
027
028
029
030import java.util.SortedSet;
031import org.opends.server.admin.Configuration;
032import org.opends.server.admin.server.ConfigurationChangeListener;
033import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn.IndexType;
034import org.opends.server.types.AttributeType;
035
036
037
038/**
039 * A server-side interface for querying Local DB Index settings.
040 * <p>
041 * Local DB Indexes are used to store information that makes it
042 * possible to locate entries very quickly when processing search
043 * operations.
044 */
045public interface LocalDBIndexCfg extends Configuration {
046
047  /**
048   * Gets the configuration class associated with this Local DB Index.
049   *
050   * @return Returns the configuration class associated with this Local DB Index.
051   */
052  Class<? extends LocalDBIndexCfg> configurationClass();
053
054
055
056  /**
057   * Register to be notified when this Local DB Index is changed.
058   *
059   * @param listener
060   *          The Local DB Index configuration change listener.
061   */
062  void addChangeListener(ConfigurationChangeListener<LocalDBIndexCfg> listener);
063
064
065
066  /**
067   * Deregister an existing Local DB Index configuration change listener.
068   *
069   * @param listener
070   *          The Local DB Index configuration change listener.
071   */
072  void removeChangeListener(ConfigurationChangeListener<LocalDBIndexCfg> listener);
073
074
075
076  /**
077   * Gets the "attribute" property.
078   * <p>
079   * Specifies the name of the attribute for which the index is to be
080   * maintained.
081   *
082   * @return Returns the value of the "attribute" property.
083   */
084  AttributeType getAttribute();
085
086
087
088  /**
089   * Gets the "index-entry-limit" property.
090   * <p>
091   * Specifies the maximum number of entries that are allowed to match
092   * a given index key before that particular index key is no longer
093   * maintained.
094   * <p>
095   * This is analogous to the ALL IDs threshold in the Sun Java System
096   * Directory Server. If this is specified, its value overrides the JE
097   * backend-wide configuration. For no limit, use 0 for the value.
098   *
099   * @return Returns the value of the "index-entry-limit" property.
100   */
101  Integer getIndexEntryLimit();
102
103
104
105  /**
106   * Gets the "index-extensible-matching-rule" property.
107   * <p>
108   * The extensible matching rule in an extensible index.
109   * <p>
110   * An extensible matching rule must be specified using either LOCALE
111   * or OID of the matching rule.
112   *
113   * @return Returns an unmodifiable set containing the values of the "index-extensible-matching-rule" property.
114   */
115  SortedSet<String> getIndexExtensibleMatchingRule();
116
117
118
119  /**
120   * Gets the "index-type" property.
121   * <p>
122   * Specifies the type(s) of indexing that should be performed for
123   * the associated attribute.
124   * <p>
125   * For equality, presence, and substring index types, the associated
126   * attribute type must have a corresponding matching rule.
127   *
128   * @return Returns an unmodifiable set containing the values of the "index-type" property.
129   */
130  SortedSet<IndexType> getIndexType();
131
132
133
134  /**
135   * Gets the "substring-length" property.
136   * <p>
137   * The length of substrings in a substring index.
138   *
139   * @return Returns the value of the "substring-length" property.
140   */
141  int getSubstringLength();
142
143}