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 010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE 011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE. 012 * See the License for the specific language governing permissions 013 * and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL HEADER in each 016 * file and include the License file at 017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, 018 * add the following below this CDDL HEADER, with the fields enclosed 019 * by brackets "[]" replaced with your own identifying information: 020 * Portions Copyright [yyyy] [name of copyright owner] 021 * 022 * CDDL HEADER END 023 * 024 * 025 * Copyright 2008 Sun Microsystems, Inc. 026 */ 027 package org.opends.server.admin.std.client; 028 029 030 031 import java.util.Collection; 032 import java.util.SortedSet; 033 import org.opends.server.admin.IllegalPropertyValueException; 034 import org.opends.server.admin.ManagedObjectDefinition; 035 import org.opends.server.admin.std.meta.FileSystemEntryCacheCfgDefn.CacheType; 036 import org.opends.server.admin.std.server.FileSystemEntryCacheCfg; 037 038 039 040 /** 041 * A client-side interface for reading and modifying File System Entry 042 * Cache settings. 043 * <p> 044 * The File System Entry Cache is an entry cache implementation which 045 * uses a JE database to keep track of the entries. 046 */ 047 public interface FileSystemEntryCacheCfgClient extends EntryCacheCfgClient { 048 049 /** 050 * Get the configuration definition associated with this File System Entry Cache. 051 * 052 * @return Returns the configuration definition associated with this File System Entry Cache. 053 */ 054 ManagedObjectDefinition<? extends FileSystemEntryCacheCfgClient, ? extends FileSystemEntryCacheCfg> definition(); 055 056 057 058 /** 059 * Gets the "cache-directory" property. 060 * <p> 061 * Specifies the directory in which the JE environment should store 062 * the cache. 063 * 064 * @return Returns the value of the "cache-directory" property. 065 */ 066 String getCacheDirectory(); 067 068 069 070 /** 071 * Sets the "cache-directory" property. 072 * <p> 073 * Specifies the directory in which the JE environment should store 074 * the cache. 075 * 076 * @param value The value of the "cache-directory" property. 077 * @throws IllegalPropertyValueException 078 * If the new value is invalid. 079 */ 080 void setCacheDirectory(String value) throws IllegalPropertyValueException; 081 082 083 084 /** 085 * Gets the "cache-type" property. 086 * <p> 087 * Specifies the policy which should be used for purging entries 088 * from the cache. 089 * 090 * @return Returns the value of the "cache-type" property. 091 */ 092 CacheType getCacheType(); 093 094 095 096 /** 097 * Sets the "cache-type" property. 098 * <p> 099 * Specifies the policy which should be used for purging entries 100 * from the cache. 101 * 102 * @param value The value of the "cache-type" property. 103 * @throws IllegalPropertyValueException 104 * If the new value is invalid. 105 */ 106 void setCacheType(CacheType value) throws IllegalPropertyValueException; 107 108 109 110 /** 111 * Gets the "compact-encoding" property. 112 * <p> 113 * Indicates whether the cache should use a compact form when 114 * encoding cache entries by compressing the attribute descriptions 115 * and object class sets. 116 * <p> 117 * Note that compression does not preserve user-supplied 118 * capitalization in the object class and attribute type names. 119 * 120 * @return Returns the value of the "compact-encoding" property. 121 */ 122 boolean isCompactEncoding(); 123 124 125 126 /** 127 * Sets the "compact-encoding" property. 128 * <p> 129 * Indicates whether the cache should use a compact form when 130 * encoding cache entries by compressing the attribute descriptions 131 * and object class sets. 132 * <p> 133 * Note that compression does not preserve user-supplied 134 * capitalization in the object class and attribute type names. 135 * 136 * @param value The value of the "compact-encoding" property. 137 * @throws IllegalPropertyValueException 138 * If the new value is invalid. 139 */ 140 void setCompactEncoding(Boolean value) throws IllegalPropertyValueException; 141 142 143 144 /** 145 * Gets the "db-cache-percent" property. 146 * <p> 147 * Specifies the maximum memory usage for the internal JE cache as a 148 * percentage of the total JVM memory. 149 * 150 * @return Returns the value of the "db-cache-percent" property. 151 */ 152 int getDBCachePercent(); 153 154 155 156 /** 157 * Sets the "db-cache-percent" property. 158 * <p> 159 * Specifies the maximum memory usage for the internal JE cache as a 160 * percentage of the total JVM memory. 161 * 162 * @param value The value of the "db-cache-percent" property. 163 * @throws IllegalPropertyValueException 164 * If the new value is invalid. 165 */ 166 void setDBCachePercent(Integer value) throws IllegalPropertyValueException; 167 168 169 170 /** 171 * Gets the "db-cache-size" property. 172 * <p> 173 * Specifies the maximum JVM memory usage in bytes for the internal 174 * JE cache. 175 * 176 * @return Returns the value of the "db-cache-size" property. 177 */ 178 long getDBCacheSize(); 179 180 181 182 /** 183 * Sets the "db-cache-size" property. 184 * <p> 185 * Specifies the maximum JVM memory usage in bytes for the internal 186 * JE cache. 187 * 188 * @param value The value of the "db-cache-size" property. 189 * @throws IllegalPropertyValueException 190 * If the new value is invalid. 191 */ 192 void setDBCacheSize(Long value) throws IllegalPropertyValueException; 193 194 195 196 /** 197 * Gets the "exclude-filter" property. 198 * <p> 199 * The set of filters that define the entries that should be 200 * excluded from the cache. 201 * 202 * @return Returns the values of the "exclude-filter" property. 203 */ 204 SortedSet<String> getExcludeFilter(); 205 206 207 208 /** 209 * Sets the "exclude-filter" property. 210 * <p> 211 * The set of filters that define the entries that should be 212 * excluded from the cache. 213 * 214 * @param values The values of the "exclude-filter" property. 215 * @throws IllegalPropertyValueException 216 * If one or more of the new values are invalid. 217 */ 218 void setExcludeFilter(Collection<String> values) throws IllegalPropertyValueException; 219 220 221 222 /** 223 * Gets the "include-filter" property. 224 * <p> 225 * The set of filters that define the entries that should be 226 * included in the cache. 227 * 228 * @return Returns the values of the "include-filter" property. 229 */ 230 SortedSet<String> getIncludeFilter(); 231 232 233 234 /** 235 * Sets the "include-filter" property. 236 * <p> 237 * The set of filters that define the entries that should be 238 * included in the cache. 239 * 240 * @param values The values of the "include-filter" property. 241 * @throws IllegalPropertyValueException 242 * If one or more of the new values are invalid. 243 */ 244 void setIncludeFilter(Collection<String> values) throws IllegalPropertyValueException; 245 246 247 248 /** 249 * Gets the "java-class" property. 250 * <p> 251 * Specifies the fully-qualified name of the Java class that 252 * provides the File System Entry Cache implementation. 253 * 254 * @return Returns the value of the "java-class" property. 255 */ 256 String getJavaClass(); 257 258 259 260 /** 261 * Sets the "java-class" property. 262 * <p> 263 * Specifies the fully-qualified name of the Java class that 264 * provides the File System Entry Cache implementation. 265 * 266 * @param value The value of the "java-class" property. 267 * @throws IllegalPropertyValueException 268 * If the new value is invalid. 269 */ 270 void setJavaClass(String value) throws IllegalPropertyValueException; 271 272 273 274 /** 275 * Gets the "je-property" property. 276 * <p> 277 * Specifies the environment properties for the Berkeley DB Java 278 * Edition database providing the backend for this entry cache. 279 * <p> 280 * Any Berkeley DB Java Edition property can be specified using the 281 * following form: property-name=property-value. Refer to the OpenDS 282 * documentation for further information on related properties, their 283 * implications and range values. The definitive identification of 284 * all the property parameters available in the example.properties 285 * file in the Berkeley DB Java Edition distribution. 286 * 287 * @return Returns the values of the "je-property" property. 288 */ 289 SortedSet<String> getJEProperty(); 290 291 292 293 /** 294 * Sets the "je-property" property. 295 * <p> 296 * Specifies the environment properties for the Berkeley DB Java 297 * Edition database providing the backend for this entry cache. 298 * <p> 299 * Any Berkeley DB Java Edition property can be specified using the 300 * following form: property-name=property-value. Refer to the OpenDS 301 * documentation for further information on related properties, their 302 * implications and range values. The definitive identification of 303 * all the property parameters available in the example.properties 304 * file in the Berkeley DB Java Edition distribution. 305 * 306 * @param values The values of the "je-property" property. 307 * @throws IllegalPropertyValueException 308 * If one or more of the new values are invalid. 309 */ 310 void setJEProperty(Collection<String> values) throws IllegalPropertyValueException; 311 312 313 314 /** 315 * Gets the "lock-timeout" property. 316 * <p> 317 * The length of time to wait while attempting to acquire a read or 318 * write lock. 319 * 320 * @return Returns the value of the "lock-timeout" property. 321 */ 322 long getLockTimeout(); 323 324 325 326 /** 327 * Sets the "lock-timeout" property. 328 * <p> 329 * The length of time to wait while attempting to acquire a read or 330 * write lock. 331 * 332 * @param value The value of the "lock-timeout" property. 333 * @throws IllegalPropertyValueException 334 * If the new value is invalid. 335 */ 336 void setLockTimeout(Long value) throws IllegalPropertyValueException; 337 338 339 340 /** 341 * Gets the "max-entries" property. 342 * <p> 343 * The maximum number of entries allowed in the cache. 344 * 345 * @return Returns the value of the "max-entries" property. 346 */ 347 int getMaxEntries(); 348 349 350 351 /** 352 * Sets the "max-entries" property. 353 * <p> 354 * The maximum number of entries allowed in the cache. 355 * 356 * @param value The value of the "max-entries" property. 357 * @throws IllegalPropertyValueException 358 * If the new value is invalid. 359 */ 360 void setMaxEntries(Integer value) throws IllegalPropertyValueException; 361 362 363 364 /** 365 * Gets the "max-memory-size" property. 366 * <p> 367 * The maximum size of the entry cache in bytes. 368 * 369 * @return Returns the value of the "max-memory-size" property. 370 */ 371 long getMaxMemorySize(); 372 373 374 375 /** 376 * Sets the "max-memory-size" property. 377 * <p> 378 * The maximum size of the entry cache in bytes. 379 * 380 * @param value The value of the "max-memory-size" property. 381 * @throws IllegalPropertyValueException 382 * If the new value is invalid. 383 */ 384 void setMaxMemorySize(Long value) throws IllegalPropertyValueException; 385 386 387 388 /** 389 * Gets the "persistent-cache" property. 390 * <p> 391 * Specifies whether the cache should persist across restarts. 392 * 393 * @return Returns the value of the "persistent-cache" property. 394 */ 395 boolean isPersistentCache(); 396 397 398 399 /** 400 * Sets the "persistent-cache" property. 401 * <p> 402 * Specifies whether the cache should persist across restarts. 403 * 404 * @param value The value of the "persistent-cache" property. 405 * @throws IllegalPropertyValueException 406 * If the new value is invalid. 407 */ 408 void setPersistentCache(Boolean value) throws IllegalPropertyValueException; 409 410 }