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.opends.server.admin.server.ConfigurationChangeListener; 031 032 033 034/** 035 * A server-side interface for querying PDB Backend settings. 036 * <p> 037 * A PDB Backend stores application data in a Persistit database. 038 */ 039public interface PDBBackendCfg extends PluggableBackendCfg { 040 041 /** 042 * Gets the configuration class associated with this PDB Backend. 043 * 044 * @return Returns the configuration class associated with this PDB Backend. 045 */ 046 Class<? extends PDBBackendCfg> configurationClass(); 047 048 049 050 /** 051 * Register to be notified when this PDB Backend is changed. 052 * 053 * @param listener 054 * The PDB Backend configuration change listener. 055 */ 056 void addPDBChangeListener(ConfigurationChangeListener<PDBBackendCfg> listener); 057 058 059 060 /** 061 * Deregister an existing PDB Backend configuration change listener. 062 * 063 * @param listener 064 * The PDB Backend configuration change listener. 065 */ 066 void removePDBChangeListener(ConfigurationChangeListener<PDBBackendCfg> listener); 067 068 069 070 /** 071 * Gets the "db-cache-percent" property. 072 * <p> 073 * Specifies the percentage of JVM memory to allocate to the 074 * database cache. 075 * <p> 076 * Specifies the percentage of memory available to the JVM that 077 * should be used for caching database contents. Note that this is 078 * only used if the value of the db-cache-size property is set to "0 079 * MB". Otherwise, the value of that property is used instead to 080 * control the cache size configuration. 081 * 082 * @return Returns the value of the "db-cache-percent" property. 083 */ 084 int getDBCachePercent(); 085 086 087 088 /** 089 * Gets the "db-cache-size" property. 090 * <p> 091 * The amount of JVM memory to allocate to the database cache. 092 * <p> 093 * Specifies the amount of memory that should be used for caching 094 * database contents. A value of "0 MB" indicates that the 095 * db-cache-percent property should be used instead to specify the 096 * cache size. 097 * 098 * @return Returns the value of the "db-cache-size" property. 099 */ 100 long getDBCacheSize(); 101 102 103 104 /** 105 * Gets the "db-checkpointer-wakeup-interval" property. 106 * <p> 107 * Specifies the maximum length of time that may pass between 108 * checkpoints. 109 * <p> 110 * This setting controls the elapsed time between attempts to write 111 * a checkpoint to the journal. A longer interval allows more updates 112 * to accumulate in buffers before they are required to be written to 113 * disk, but also potentially causes recovery from an abrupt 114 * termination (crash) to take more time. 115 * 116 * @return Returns the value of the "db-checkpointer-wakeup-interval" property. 117 */ 118 long getDBCheckpointerWakeupInterval(); 119 120 121 122 /** 123 * Gets the "db-directory" property. 124 * <p> 125 * Specifies the path to the filesystem directory that is used to 126 * hold the Persistit database files containing the data for this 127 * backend. 128 * <p> 129 * The path may be either an absolute path or a path relative to the 130 * directory containing the base of the OpenDJ directory server 131 * installation. The path may be any valid directory path in which 132 * the server has appropriate permissions to read and write files and 133 * has sufficient space to hold the database contents. 134 * 135 * @return Returns the value of the "db-directory" property. 136 */ 137 String getDBDirectory(); 138 139 140 141 /** 142 * Gets the "db-directory-permissions" property. 143 * <p> 144 * Specifies the permissions that should be applied to the directory 145 * containing the server database files. 146 * <p> 147 * They should be expressed as three-digit octal values, which is 148 * the traditional representation for UNIX file permissions. The 149 * three digits represent the permissions that are available for the 150 * directory's owner, group members, and other users (in that order), 151 * and each digit is the octal representation of the read, write, and 152 * execute bits. Note that this only impacts permissions on the 153 * database directory and not on the files written into that 154 * directory. On UNIX systems, the user's umask controls permissions 155 * given to the database files. 156 * 157 * @return Returns the value of the "db-directory-permissions" property. 158 */ 159 String getDBDirectoryPermissions(); 160 161 162 163 /** 164 * Gets the "db-txn-no-sync" property. 165 * <p> 166 * Indicates whether database writes should be primarily written to 167 * an internal buffer but not immediately written to disk. 168 * <p> 169 * Setting the value of this configuration attribute to "true" may 170 * improve write performance but could cause the most recent changes 171 * to be lost if the OpenDJ directory server or the underlying JVM 172 * exits abnormally, or if an OS or hardware failure occurs (a 173 * behavior similar to running with transaction durability disabled 174 * in the Sun Java System Directory Server). 175 * 176 * @return Returns the value of the "db-txn-no-sync" property. 177 */ 178 boolean isDBTxnNoSync(); 179 180 181 182 /** 183 * Gets the "disk-full-threshold" property. 184 * <p> 185 * Full disk threshold to limit database updates 186 * <p> 187 * When the available free space on the disk used by this database 188 * instance falls below the value specified, no updates are permitted 189 * and the server returns an UNWILLING_TO_PERFORM error. Updates are 190 * allowed again as soon as free space rises above the threshold. 191 * 192 * @return Returns the value of the "disk-full-threshold" property. 193 */ 194 long getDiskFullThreshold(); 195 196 197 198 /** 199 * Gets the "disk-low-threshold" property. 200 * <p> 201 * Low disk threshold to limit database updates 202 * <p> 203 * Specifies the "low" free space on the disk. When the available 204 * free space on the disk used by this database instance falls below 205 * the value specified, protocol updates on this database are 206 * permitted only by a user with the BYPASS_LOCKDOWN privilege. 207 * 208 * @return Returns the value of the "disk-low-threshold" property. 209 */ 210 long getDiskLowThreshold(); 211 212 213 214 /** 215 * Gets the "java-class" property. 216 * <p> 217 * Specifies the fully-qualified name of the Java class that 218 * provides the backend implementation. 219 * 220 * @return Returns the value of the "java-class" property. 221 */ 222 String getJavaClass(); 223 224}