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 org.forgerock.opendj.config.server.ConfigException; 031import org.opends.server.admin.server.ConfigurationAddListener; 032import org.opends.server.admin.server.ConfigurationChangeListener; 033import org.opends.server.admin.server.ConfigurationDeleteListener; 034import org.opends.server.admin.std.meta.BackendCfgDefn.WritabilityMode; 035 036 037 038/** 039 * A server-side interface for querying Pluggable Backend settings. 040 * <p> 041 * A Pluggable Backend stores application data in a pluggable 042 * database. 043 */ 044public interface PluggableBackendCfg extends BackendCfg { 045 046 /** 047 * Gets the configuration class associated with this Pluggable Backend. 048 * 049 * @return Returns the configuration class associated with this Pluggable Backend. 050 */ 051 Class<? extends PluggableBackendCfg> configurationClass(); 052 053 054 055 /** 056 * Register to be notified when this Pluggable Backend is changed. 057 * 058 * @param listener 059 * The Pluggable Backend configuration change listener. 060 */ 061 void addPluggableChangeListener(ConfigurationChangeListener<PluggableBackendCfg> listener); 062 063 064 065 /** 066 * Deregister an existing Pluggable Backend configuration change listener. 067 * 068 * @param listener 069 * The Pluggable Backend configuration change listener. 070 */ 071 void removePluggableChangeListener(ConfigurationChangeListener<PluggableBackendCfg> listener); 072 073 074 075 /** 076 * Gets the "compact-encoding" property. 077 * <p> 078 * Indicates whether the backend should use a compact form when 079 * encoding entries by compressing the attribute descriptions and 080 * object class sets. 081 * <p> 082 * Note that this property applies only to the entries themselves 083 * and does not impact the index data. 084 * 085 * @return Returns the value of the "compact-encoding" property. 086 */ 087 boolean isCompactEncoding(); 088 089 090 091 /** 092 * Gets the "entries-compressed" property. 093 * <p> 094 * Indicates whether the backend should attempt to compress entries 095 * before storing them in the database. 096 * <p> 097 * Note that this property applies only to the entries themselves 098 * and does not impact the index data. Further, the effectiveness of 099 * the compression is based on the type of data contained in the 100 * entry. 101 * 102 * @return Returns the value of the "entries-compressed" property. 103 */ 104 boolean isEntriesCompressed(); 105 106 107 108 /** 109 * Gets the "index-entry-limit" property. 110 * <p> 111 * Specifies the maximum number of entries that is allowed to match 112 * a given index key before that particular index key is no longer 113 * maintained. 114 * <p> 115 * This property is analogous to the ALL IDs threshold in the Sun 116 * Java System Directory Server. Note that this is the default limit 117 * for the backend, and it may be overridden on a per-attribute 118 * basis.A value of 0 means there is no limit. 119 * 120 * @return Returns the value of the "index-entry-limit" property. 121 */ 122 int getIndexEntryLimit(); 123 124 125 126 /** 127 * Gets the "index-filter-analyzer-enabled" property. 128 * <p> 129 * Indicates whether to gather statistical information about the 130 * search filters processed by the directory server while evaluating 131 * the usage of indexes. 132 * <p> 133 * Analyzing indexes requires gathering search filter usage patterns 134 * from user requests, especially for values as specified in the 135 * filters and subsequently looking the status of those values into 136 * the index files. When a search requests is processed, internal or 137 * user generated, a first phase uses indexes to find potential 138 * entries to be returned. Depending on the search filter, if the 139 * index of one of the specified attributes matches too many entries 140 * (exceeds the index entry limit), the search becomes non-indexed. 141 * In any case, all entries thus gathered (or the entire DIT) are 142 * matched against the filter for actually returning the search 143 * result. 144 * 145 * @return Returns the value of the "index-filter-analyzer-enabled" property. 146 */ 147 boolean isIndexFilterAnalyzerEnabled(); 148 149 150 151 /** 152 * Gets the "index-filter-analyzer-max-filters" property. 153 * <p> 154 * The maximum number of search filter statistics to keep. 155 * <p> 156 * When the maximum number of search filter is reached, the least 157 * used one will be deleted. 158 * 159 * @return Returns the value of the "index-filter-analyzer-max-filters" property. 160 */ 161 int getIndexFilterAnalyzerMaxFilters(); 162 163 164 165 /** 166 * Gets the "preload-time-limit" property. 167 * <p> 168 * Specifies the length of time that the backend is allowed to spend 169 * "pre-loading" data when it is initialized. 170 * <p> 171 * The pre-load process is used to pre-populate the database cache, 172 * so that it can be more quickly available when the server is 173 * processing requests. A duration of zero means there is no 174 * pre-load. 175 * 176 * @return Returns the value of the "preload-time-limit" property. 177 */ 178 long getPreloadTimeLimit(); 179 180 181 182 /** 183 * Gets the "writability-mode" property. 184 * <p> 185 * Specifies the behavior that the backend should use when 186 * processing write operations. 187 * 188 * @return Returns the value of the "writability-mode" property. 189 */ 190 WritabilityMode getWritabilityMode(); 191 192 193 194 /** 195 * Lists the Backend Indexes. 196 * 197 * @return Returns an array containing the names of the 198 * Backend Indexes. 199 */ 200 String[] listBackendIndexes(); 201 202 203 204 /** 205 * Gets the named Backend Index. 206 * 207 * @param name 208 * The name of the Backend Index to retrieve. 209 * @return Returns the named Backend Index. 210 * @throws ConfigException 211 * If the Backend Index could not be found or it 212 * could not be successfully decoded. 213 */ 214 BackendIndexCfg getBackendIndex(String name) throws ConfigException; 215 216 217 218 /** 219 * Registers to be notified when new Backend Indexes are added. 220 * 221 * @param listener 222 * The Backend Index configuration add listener. 223 * @throws ConfigException 224 * If the add listener could not be registered. 225 */ 226 void addBackendIndexAddListener(ConfigurationAddListener<BackendIndexCfg> listener) throws ConfigException; 227 228 229 230 /** 231 * Deregisters an existing Backend Index configuration add listener. 232 * 233 * @param listener 234 * The Backend Index configuration add listener. 235 */ 236 void removeBackendIndexAddListener(ConfigurationAddListener<BackendIndexCfg> listener); 237 238 239 240 /** 241 * Registers to be notified when existing Backend Indexes are deleted. 242 * 243 * @param listener 244 * The Backend Index configuration delete listener. 245 * @throws ConfigException 246 * If the delete listener could not be registered. 247 */ 248 void addBackendIndexDeleteListener(ConfigurationDeleteListener<BackendIndexCfg> listener) throws ConfigException; 249 250 251 252 /** 253 * Deregisters an existing Backend Index configuration delete listener. 254 * 255 * @param listener 256 * The Backend Index configuration delete listener. 257 */ 258 void removeBackendIndexDeleteListener(ConfigurationDeleteListener<BackendIndexCfg> listener); 259 260 261 262 /** 263 * Lists the Backend VLV Indexes. 264 * 265 * @return Returns an array containing the names of the 266 * Backend VLV Indexes. 267 */ 268 String[] listBackendVLVIndexes(); 269 270 271 272 /** 273 * Gets the named Backend VLV Index. 274 * 275 * @param name 276 * The name of the Backend VLV Index to retrieve. 277 * @return Returns the named Backend VLV Index. 278 * @throws ConfigException 279 * If the Backend VLV Index could not be found or it 280 * could not be successfully decoded. 281 */ 282 BackendVLVIndexCfg getBackendVLVIndex(String name) throws ConfigException; 283 284 285 286 /** 287 * Registers to be notified when new Backend VLV Indexes are added. 288 * 289 * @param listener 290 * The Backend VLV Index configuration add listener. 291 * @throws ConfigException 292 * If the add listener could not be registered. 293 */ 294 void addBackendVLVIndexAddListener(ConfigurationAddListener<BackendVLVIndexCfg> listener) throws ConfigException; 295 296 297 298 /** 299 * Deregisters an existing Backend VLV Index configuration add listener. 300 * 301 * @param listener 302 * The Backend VLV Index configuration add listener. 303 */ 304 void removeBackendVLVIndexAddListener(ConfigurationAddListener<BackendVLVIndexCfg> listener); 305 306 307 308 /** 309 * Registers to be notified when existing Backend VLV Indexes are deleted. 310 * 311 * @param listener 312 * The Backend VLV Index configuration delete listener. 313 * @throws ConfigException 314 * If the delete listener could not be registered. 315 */ 316 void addBackendVLVIndexDeleteListener(ConfigurationDeleteListener<BackendVLVIndexCfg> listener) throws ConfigException; 317 318 319 320 /** 321 * Deregisters an existing Backend VLV Index configuration delete listener. 322 * 323 * @param listener 324 * The Backend VLV Index configuration delete listener. 325 */ 326 void removeBackendVLVIndexDeleteListener(ConfigurationDeleteListener<BackendVLVIndexCfg> listener); 327 328}