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.forgerock.opendj.server.config.server; 017 018 019 020import java.util.SortedSet; 021import org.forgerock.opendj.config.Configuration; 022import org.forgerock.opendj.config.server.ConfigurationChangeListener; 023import org.forgerock.opendj.ldap.schema.AttributeType; 024import org.forgerock.opendj.server.config.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 "confidentiality-enabled" property. 080 * <p> 081 * Specifies whether contents of the index should be confidential. 082 * <p> 083 * Setting the flag to true will hash keys for equality type indexes 084 * using SHA-1 and encrypt the list of entries matching a substring 085 * key for substring indexes. 086 * 087 * @return Returns the value of the "confidentiality-enabled" property. 088 */ 089 boolean isConfidentialityEnabled(); 090 091 092 093 /** 094 * Gets the "index-entry-limit" property. 095 * <p> 096 * Specifies the maximum number of entries that are allowed to match 097 * a given index key before that particular index key is no longer 098 * maintained. 099 * <p> 100 * This is analogous to the ALL IDs threshold in the Sun Java System 101 * Directory Server. If this is specified, its value overrides the JE 102 * backend-wide configuration. For no limit, use 0 for the value. 103 * 104 * @return Returns the value of the "index-entry-limit" property. 105 */ 106 Integer getIndexEntryLimit(); 107 108 109 110 /** 111 * Gets the "index-extensible-matching-rule" property. 112 * <p> 113 * The extensible matching rule in an extensible index. 114 * <p> 115 * An extensible matching rule must be specified using either LOCALE 116 * or OID of the matching rule. 117 * 118 * @return Returns an unmodifiable set containing the values of the "index-extensible-matching-rule" property. 119 */ 120 SortedSet<String> getIndexExtensibleMatchingRule(); 121 122 123 124 /** 125 * Gets the "index-type" property. 126 * <p> 127 * Specifies the type(s) of indexing that should be performed for 128 * the associated attribute. 129 * <p> 130 * For equality, presence, and substring index types, the associated 131 * attribute type must have a corresponding matching rule. 132 * 133 * @return Returns an unmodifiable set containing the values of the "index-type" property. 134 */ 135 SortedSet<IndexType> getIndexType(); 136 137 138 139 /** 140 * Gets the "substring-length" property. 141 * <p> 142 * The length of substrings in a substring index. 143 * 144 * @return Returns the value of the "substring-length" property. 145 */ 146 int getSubstringLength(); 147 148}