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.client; 027 028 029 030import org.opends.server.admin.ManagedObjectDefinition; 031import org.opends.server.admin.PropertyException; 032import org.opends.server.admin.std.server.PDBBackendCfg; 033 034 035 036/** 037 * A client-side interface for reading and modifying PDB Backend 038 * settings. 039 * <p> 040 * A PDB Backend stores application data in a Persistit database. 041 */ 042public interface PDBBackendCfgClient extends PluggableBackendCfgClient { 043 044 /** 045 * Get the configuration definition associated with this PDB Backend. 046 * 047 * @return Returns the configuration definition associated with this PDB Backend. 048 */ 049 ManagedObjectDefinition<? extends PDBBackendCfgClient, ? extends PDBBackendCfg> definition(); 050 051 052 053 /** 054 * Gets the "db-cache-percent" property. 055 * <p> 056 * Specifies the percentage of JVM memory to allocate to the 057 * database cache. 058 * <p> 059 * Specifies the percentage of memory available to the JVM that 060 * should be used for caching database contents. Note that this is 061 * only used if the value of the db-cache-size property is set to "0 062 * MB". Otherwise, the value of that property is used instead to 063 * control the cache size configuration. 064 * 065 * @return Returns the value of the "db-cache-percent" property. 066 */ 067 int getDBCachePercent(); 068 069 070 071 /** 072 * Sets the "db-cache-percent" property. 073 * <p> 074 * Specifies the percentage of JVM memory to allocate to the 075 * database cache. 076 * <p> 077 * Specifies the percentage of memory available to the JVM that 078 * should be used for caching database contents. Note that this is 079 * only used if the value of the db-cache-size property is set to "0 080 * MB". Otherwise, the value of that property is used instead to 081 * control the cache size configuration. 082 * 083 * @param value The value of the "db-cache-percent" property. 084 * @throws PropertyException 085 * If the new value is invalid. 086 */ 087 void setDBCachePercent(Integer value) throws PropertyException; 088 089 090 091 /** 092 * Gets the "db-cache-size" property. 093 * <p> 094 * The amount of JVM memory to allocate to the database cache. 095 * <p> 096 * Specifies the amount of memory that should be used for caching 097 * database contents. A value of "0 MB" indicates that the 098 * db-cache-percent property should be used instead to specify the 099 * cache size. 100 * 101 * @return Returns the value of the "db-cache-size" property. 102 */ 103 long getDBCacheSize(); 104 105 106 107 /** 108 * Sets the "db-cache-size" property. 109 * <p> 110 * The amount of JVM memory to allocate to the database cache. 111 * <p> 112 * Specifies the amount of memory that should be used for caching 113 * database contents. A value of "0 MB" indicates that the 114 * db-cache-percent property should be used instead to specify the 115 * cache size. 116 * 117 * @param value The value of the "db-cache-size" property. 118 * @throws PropertyException 119 * If the new value is invalid. 120 */ 121 void setDBCacheSize(Long value) throws PropertyException; 122 123 124 125 /** 126 * Gets the "db-checkpointer-wakeup-interval" property. 127 * <p> 128 * Specifies the maximum length of time that may pass between 129 * checkpoints. 130 * <p> 131 * This setting controls the elapsed time between attempts to write 132 * a checkpoint to the journal. A longer interval allows more updates 133 * to accumulate in buffers before they are required to be written to 134 * disk, but also potentially causes recovery from an abrupt 135 * termination (crash) to take more time. 136 * 137 * @return Returns the value of the "db-checkpointer-wakeup-interval" property. 138 */ 139 long getDBCheckpointerWakeupInterval(); 140 141 142 143 /** 144 * Sets the "db-checkpointer-wakeup-interval" property. 145 * <p> 146 * Specifies the maximum length of time that may pass between 147 * checkpoints. 148 * <p> 149 * This setting controls the elapsed time between attempts to write 150 * a checkpoint to the journal. A longer interval allows more updates 151 * to accumulate in buffers before they are required to be written to 152 * disk, but also potentially causes recovery from an abrupt 153 * termination (crash) to take more time. 154 * 155 * @param value The value of the "db-checkpointer-wakeup-interval" property. 156 * @throws PropertyException 157 * If the new value is invalid. 158 */ 159 void setDBCheckpointerWakeupInterval(Long value) throws PropertyException; 160 161 162 163 /** 164 * Gets the "db-directory" property. 165 * <p> 166 * Specifies the path to the filesystem directory that is used to 167 * hold the Persistit database files containing the data for this 168 * backend. 169 * <p> 170 * The path may be either an absolute path or a path relative to the 171 * directory containing the base of the OpenDJ directory server 172 * installation. The path may be any valid directory path in which 173 * the server has appropriate permissions to read and write files and 174 * has sufficient space to hold the database contents. 175 * 176 * @return Returns the value of the "db-directory" property. 177 */ 178 String getDBDirectory(); 179 180 181 182 /** 183 * Sets the "db-directory" property. 184 * <p> 185 * Specifies the path to the filesystem directory that is used to 186 * hold the Persistit database files containing the data for this 187 * backend. 188 * <p> 189 * The path may be either an absolute path or a path relative to the 190 * directory containing the base of the OpenDJ directory server 191 * installation. The path may be any valid directory path in which 192 * the server has appropriate permissions to read and write files and 193 * has sufficient space to hold the database contents. 194 * 195 * @param value The value of the "db-directory" property. 196 * @throws PropertyException 197 * If the new value is invalid. 198 */ 199 void setDBDirectory(String value) throws PropertyException; 200 201 202 203 /** 204 * Gets the "db-directory-permissions" property. 205 * <p> 206 * Specifies the permissions that should be applied to the directory 207 * containing the server database files. 208 * <p> 209 * They should be expressed as three-digit octal values, which is 210 * the traditional representation for UNIX file permissions. The 211 * three digits represent the permissions that are available for the 212 * directory's owner, group members, and other users (in that order), 213 * and each digit is the octal representation of the read, write, and 214 * execute bits. Note that this only impacts permissions on the 215 * database directory and not on the files written into that 216 * directory. On UNIX systems, the user's umask controls permissions 217 * given to the database files. 218 * 219 * @return Returns the value of the "db-directory-permissions" property. 220 */ 221 String getDBDirectoryPermissions(); 222 223 224 225 /** 226 * Sets the "db-directory-permissions" property. 227 * <p> 228 * Specifies the permissions that should be applied to the directory 229 * containing the server database files. 230 * <p> 231 * They should be expressed as three-digit octal values, which is 232 * the traditional representation for UNIX file permissions. The 233 * three digits represent the permissions that are available for the 234 * directory's owner, group members, and other users (in that order), 235 * and each digit is the octal representation of the read, write, and 236 * execute bits. Note that this only impacts permissions on the 237 * database directory and not on the files written into that 238 * directory. On UNIX systems, the user's umask controls permissions 239 * given to the database files. 240 * 241 * @param value The value of the "db-directory-permissions" property. 242 * @throws PropertyException 243 * If the new value is invalid. 244 */ 245 void setDBDirectoryPermissions(String value) throws PropertyException; 246 247 248 249 /** 250 * Gets the "db-txn-no-sync" property. 251 * <p> 252 * Indicates whether database writes should be primarily written to 253 * an internal buffer but not immediately written to disk. 254 * <p> 255 * Setting the value of this configuration attribute to "true" may 256 * improve write performance but could cause the most recent changes 257 * to be lost if the OpenDJ directory server or the underlying JVM 258 * exits abnormally, or if an OS or hardware failure occurs (a 259 * behavior similar to running with transaction durability disabled 260 * in the Sun Java System Directory Server). 261 * 262 * @return Returns the value of the "db-txn-no-sync" property. 263 */ 264 boolean isDBTxnNoSync(); 265 266 267 268 /** 269 * Sets the "db-txn-no-sync" property. 270 * <p> 271 * Indicates whether database writes should be primarily written to 272 * an internal buffer but not immediately written to disk. 273 * <p> 274 * Setting the value of this configuration attribute to "true" may 275 * improve write performance but could cause the most recent changes 276 * to be lost if the OpenDJ directory server or the underlying JVM 277 * exits abnormally, or if an OS or hardware failure occurs (a 278 * behavior similar to running with transaction durability disabled 279 * in the Sun Java System Directory Server). 280 * 281 * @param value The value of the "db-txn-no-sync" property. 282 * @throws PropertyException 283 * If the new value is invalid. 284 */ 285 void setDBTxnNoSync(Boolean value) throws PropertyException; 286 287 288 289 /** 290 * Gets the "disk-full-threshold" property. 291 * <p> 292 * Full disk threshold to limit database updates 293 * <p> 294 * When the available free space on the disk used by this database 295 * instance falls below the value specified, no updates are permitted 296 * and the server returns an UNWILLING_TO_PERFORM error. Updates are 297 * allowed again as soon as free space rises above the threshold. 298 * 299 * @return Returns the value of the "disk-full-threshold" property. 300 */ 301 long getDiskFullThreshold(); 302 303 304 305 /** 306 * Sets the "disk-full-threshold" property. 307 * <p> 308 * Full disk threshold to limit database updates 309 * <p> 310 * When the available free space on the disk used by this database 311 * instance falls below the value specified, no updates are permitted 312 * and the server returns an UNWILLING_TO_PERFORM error. Updates are 313 * allowed again as soon as free space rises above the threshold. 314 * 315 * @param value The value of the "disk-full-threshold" property. 316 * @throws PropertyException 317 * If the new value is invalid. 318 */ 319 void setDiskFullThreshold(Long value) throws PropertyException; 320 321 322 323 /** 324 * Gets the "disk-low-threshold" property. 325 * <p> 326 * Low disk threshold to limit database updates 327 * <p> 328 * Specifies the "low" free space on the disk. When the available 329 * free space on the disk used by this database instance falls below 330 * the value specified, protocol updates on this database are 331 * permitted only by a user with the BYPASS_LOCKDOWN privilege. 332 * 333 * @return Returns the value of the "disk-low-threshold" property. 334 */ 335 long getDiskLowThreshold(); 336 337 338 339 /** 340 * Sets the "disk-low-threshold" property. 341 * <p> 342 * Low disk threshold to limit database updates 343 * <p> 344 * Specifies the "low" free space on the disk. When the available 345 * free space on the disk used by this database instance falls below 346 * the value specified, protocol updates on this database are 347 * permitted only by a user with the BYPASS_LOCKDOWN privilege. 348 * 349 * @param value The value of the "disk-low-threshold" property. 350 * @throws PropertyException 351 * If the new value is invalid. 352 */ 353 void setDiskLowThreshold(Long value) throws PropertyException; 354 355 356 357 /** 358 * Gets the "java-class" property. 359 * <p> 360 * Specifies the fully-qualified name of the Java class that 361 * provides the backend implementation. 362 * 363 * @return Returns the value of the "java-class" property. 364 */ 365 String getJavaClass(); 366 367 368 369 /** 370 * Sets the "java-class" property. 371 * <p> 372 * Specifies the fully-qualified name of the Java class that 373 * provides the backend implementation. 374 * 375 * @param value The value of the "java-class" property. 376 * @throws PropertyException 377 * If the new value is invalid. 378 */ 379 void setJavaClass(String value) throws PropertyException; 380 381}