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