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.client;
017
018
019
020import java.util.Collection;
021import java.util.SortedSet;
022import org.forgerock.opendj.config.ManagedObjectDefinition;
023import org.forgerock.opendj.config.PropertyException;
024import org.forgerock.opendj.server.config.server.JEBackendCfg;
025
026
027
028/**
029 * A client-side interface for reading and modifying JE Backend
030 * settings.
031 * <p>
032 * A JE Backend stores application data in a Berkeley DB Java Edition
033 * database.
034 */
035public interface JEBackendCfgClient extends PluggableBackendCfgClient {
036
037  /**
038   * Get the configuration definition associated with this JE Backend.
039   *
040   * @return Returns the configuration definition associated with this JE Backend.
041   */
042  ManagedObjectDefinition<? extends JEBackendCfgClient, ? extends JEBackendCfg> definition();
043
044
045
046  /**
047   * Gets the "db-cache-percent" property.
048   * <p>
049   * Specifies the percentage of JVM memory to allocate to the
050   * database cache.
051   * <p>
052   * Specifies the percentage of memory available to the JVM that
053   * should be used for caching database contents. Note that this is
054   * only used if the value of the db-cache-size property is set to "0
055   * MB". Otherwise, the value of that property is used instead to
056   * control the cache size configuration.
057   *
058   * @return Returns the value of the "db-cache-percent" property.
059   */
060  int getDBCachePercent();
061
062
063
064  /**
065   * Sets the "db-cache-percent" property.
066   * <p>
067   * Specifies the percentage of JVM memory to allocate to the
068   * database cache.
069   * <p>
070   * Specifies the percentage of memory available to the JVM that
071   * should be used for caching database contents. Note that this is
072   * only used if the value of the db-cache-size property is set to "0
073   * MB". Otherwise, the value of that property is used instead to
074   * control the cache size configuration.
075   *
076   * @param value The value of the "db-cache-percent" property.
077   * @throws PropertyException
078   *           If the new value is invalid.
079   */
080  void setDBCachePercent(Integer value) throws PropertyException;
081
082
083
084  /**
085   * Gets the "db-cache-size" property.
086   * <p>
087   * The amount of JVM memory to allocate to the database cache.
088   * <p>
089   * Specifies the amount of memory that should be used for caching
090   * database contents. A value of "0 MB" indicates that the
091   * db-cache-percent property should be used instead to specify the
092   * cache size.
093   *
094   * @return Returns the value of the "db-cache-size" property.
095   */
096  long getDBCacheSize();
097
098
099
100  /**
101   * Sets the "db-cache-size" property.
102   * <p>
103   * The amount of JVM memory to allocate to the database cache.
104   * <p>
105   * Specifies the amount of memory that should be used for caching
106   * database contents. A value of "0 MB" indicates that the
107   * db-cache-percent property should be used instead to specify the
108   * cache size.
109   *
110   * @param value The value of the "db-cache-size" property.
111   * @throws PropertyException
112   *           If the new value is invalid.
113   */
114  void setDBCacheSize(Long value) throws PropertyException;
115
116
117
118  /**
119   * Gets the "db-checkpointer-bytes-interval" property.
120   * <p>
121   * Specifies the maximum number of bytes that may be written to the
122   * database before it is forced to perform a checkpoint.
123   * <p>
124   * This can be used to bound the recovery time that may be required
125   * if the database environment is opened without having been properly
126   * closed. If this property is set to a non-zero value, the
127   * checkpointer wakeup interval is not used. To use time-based
128   * checkpointing, set this property to zero.
129   *
130   * @return Returns the value of the "db-checkpointer-bytes-interval" property.
131   */
132  long getDBCheckpointerBytesInterval();
133
134
135
136  /**
137   * Sets the "db-checkpointer-bytes-interval" property.
138   * <p>
139   * Specifies the maximum number of bytes that may be written to the
140   * database before it is forced to perform a checkpoint.
141   * <p>
142   * This can be used to bound the recovery time that may be required
143   * if the database environment is opened without having been properly
144   * closed. If this property is set to a non-zero value, the
145   * checkpointer wakeup interval is not used. To use time-based
146   * checkpointing, set this property to zero.
147   *
148   * @param value The value of the "db-checkpointer-bytes-interval" property.
149   * @throws PropertyException
150   *           If the new value is invalid.
151   */
152  void setDBCheckpointerBytesInterval(Long value) throws PropertyException;
153
154
155
156  /**
157   * Gets the "db-checkpointer-wakeup-interval" property.
158   * <p>
159   * Specifies the maximum length of time that may pass between
160   * checkpoints.
161   * <p>
162   * Note that this is only used if the value of the checkpointer
163   * bytes interval is zero.
164   *
165   * @return Returns the value of the "db-checkpointer-wakeup-interval" property.
166   */
167  long getDBCheckpointerWakeupInterval();
168
169
170
171  /**
172   * Sets the "db-checkpointer-wakeup-interval" property.
173   * <p>
174   * Specifies the maximum length of time that may pass between
175   * checkpoints.
176   * <p>
177   * Note that this is only used if the value of the checkpointer
178   * bytes interval is zero.
179   *
180   * @param value The value of the "db-checkpointer-wakeup-interval" property.
181   * @throws PropertyException
182   *           If the new value is invalid.
183   */
184  void setDBCheckpointerWakeupInterval(Long value) throws PropertyException;
185
186
187
188  /**
189   * Gets the "db-cleaner-min-utilization" property.
190   * <p>
191   * Specifies the occupancy percentage for "live" data in this
192   * backend's database.
193   * <p>
194   * When the amount of "live" data in the database drops below this
195   * value, cleaners will act to increase the occupancy percentage by
196   * compacting the database.
197   *
198   * @return Returns the value of the "db-cleaner-min-utilization" property.
199   */
200  int getDBCleanerMinUtilization();
201
202
203
204  /**
205   * Sets the "db-cleaner-min-utilization" property.
206   * <p>
207   * Specifies the occupancy percentage for "live" data in this
208   * backend's database.
209   * <p>
210   * When the amount of "live" data in the database drops below this
211   * value, cleaners will act to increase the occupancy percentage by
212   * compacting the database.
213   *
214   * @param value The value of the "db-cleaner-min-utilization" property.
215   * @throws PropertyException
216   *           If the new value is invalid.
217   */
218  void setDBCleanerMinUtilization(Integer value) throws PropertyException;
219
220
221
222  /**
223   * Gets the "db-directory" property.
224   * <p>
225   * Specifies the path to the filesystem directory that is used to
226   * hold the Berkeley DB Java Edition database files containing the
227   * data for this backend.
228   * <p>
229   * The path may be either an absolute path or a path relative to the
230   * directory containing the base of the OpenDJ directory server
231   * installation. The path may be any valid directory path in which
232   * the server has appropriate permissions to read and write files and
233   * has sufficient space to hold the database contents.
234   *
235   * @return Returns the value of the "db-directory" property.
236   */
237  String getDBDirectory();
238
239
240
241  /**
242   * Sets the "db-directory" property.
243   * <p>
244   * Specifies the path to the filesystem directory that is used to
245   * hold the Berkeley DB Java Edition database files containing the
246   * data for this backend.
247   * <p>
248   * The path may be either an absolute path or a path relative to the
249   * directory containing the base of the OpenDJ directory server
250   * installation. The path may be any valid directory path in which
251   * the server has appropriate permissions to read and write files and
252   * has sufficient space to hold the database contents.
253   *
254   * @param value The value of the "db-directory" property.
255   * @throws PropertyException
256   *           If the new value is invalid.
257   */
258  void setDBDirectory(String value) throws PropertyException;
259
260
261
262  /**
263   * Gets the "db-directory-permissions" property.
264   * <p>
265   * Specifies the permissions that should be applied to the directory
266   * containing the server database files.
267   * <p>
268   * They should be expressed as three-digit octal values, which is
269   * the traditional representation for UNIX file permissions. The
270   * three digits represent the permissions that are available for the
271   * directory's owner, group members, and other users (in that order),
272   * and each digit is the octal representation of the read, write, and
273   * execute bits. Note that this only impacts permissions on the
274   * database directory and not on the files written into that
275   * directory. On UNIX systems, the user's umask controls permissions
276   * given to the database files.
277   *
278   * @return Returns the value of the "db-directory-permissions" property.
279   */
280  String getDBDirectoryPermissions();
281
282
283
284  /**
285   * Sets the "db-directory-permissions" property.
286   * <p>
287   * Specifies the permissions that should be applied to the directory
288   * containing the server database files.
289   * <p>
290   * They should be expressed as three-digit octal values, which is
291   * the traditional representation for UNIX file permissions. The
292   * three digits represent the permissions that are available for the
293   * directory's owner, group members, and other users (in that order),
294   * and each digit is the octal representation of the read, write, and
295   * execute bits. Note that this only impacts permissions on the
296   * database directory and not on the files written into that
297   * directory. On UNIX systems, the user's umask controls permissions
298   * given to the database files.
299   *
300   * @param value The value of the "db-directory-permissions" property.
301   * @throws PropertyException
302   *           If the new value is invalid.
303   */
304  void setDBDirectoryPermissions(String value) throws PropertyException;
305
306
307
308  /**
309   * Gets the "db-evictor-core-threads" property.
310   * <p>
311   * Specifies the core number of threads in the eviction thread pool.
312   * <p>
313   * Specifies the core number of threads in the eviction thread pool.
314   * These threads help keep memory usage within cache bounds,
315   * offloading work from application threads. db-evictor-core-threads,
316   * db-evictor-max-threads and db-evictor-keep-alive are used to
317   * configure the core, max and keepalive attributes for the eviction
318   * thread pool.
319   *
320   * @return Returns the value of the "db-evictor-core-threads" property.
321   */
322  int getDBEvictorCoreThreads();
323
324
325
326  /**
327   * Sets the "db-evictor-core-threads" property.
328   * <p>
329   * Specifies the core number of threads in the eviction thread pool.
330   * <p>
331   * Specifies the core number of threads in the eviction thread pool.
332   * These threads help keep memory usage within cache bounds,
333   * offloading work from application threads. db-evictor-core-threads,
334   * db-evictor-max-threads and db-evictor-keep-alive are used to
335   * configure the core, max and keepalive attributes for the eviction
336   * thread pool.
337   *
338   * @param value The value of the "db-evictor-core-threads" property.
339   * @throws PropertyException
340   *           If the new value is invalid.
341   */
342  void setDBEvictorCoreThreads(Integer value) throws PropertyException;
343
344
345
346  /**
347   * Gets the "db-evictor-keep-alive" property.
348   * <p>
349   * The duration that excess threads in the eviction thread pool will
350   * stay idle. After this period, idle threads will terminate.
351   * <p>
352   * The duration that excess threads in the eviction thread pool will
353   * stay idle. After this period, idle threads will terminate.
354   * db-evictor-core-threads, db-evictor-max-threads and
355   * db-evictor-keep-alive are used to configure the core, max and
356   * keepalive attributes for the eviction thread pool.
357   *
358   * @return Returns the value of the "db-evictor-keep-alive" property.
359   */
360  long getDBEvictorKeepAlive();
361
362
363
364  /**
365   * Sets the "db-evictor-keep-alive" property.
366   * <p>
367   * The duration that excess threads in the eviction thread pool will
368   * stay idle. After this period, idle threads will terminate.
369   * <p>
370   * The duration that excess threads in the eviction thread pool will
371   * stay idle. After this period, idle threads will terminate.
372   * db-evictor-core-threads, db-evictor-max-threads and
373   * db-evictor-keep-alive are used to configure the core, max and
374   * keepalive attributes for the eviction thread pool.
375   *
376   * @param value The value of the "db-evictor-keep-alive" property.
377   * @throws PropertyException
378   *           If the new value is invalid.
379   */
380  void setDBEvictorKeepAlive(Long value) throws PropertyException;
381
382
383
384  /**
385   * Gets the "db-evictor-lru-only" property.
386   * <p>
387   * Indicates whether the database should evict existing data from
388   * the cache based on an LRU policy (where the least recently used
389   * information will be evicted first).
390   * <p>
391   * If set to "false", then the eviction keeps internal nodes of the
392   * underlying Btree in the cache over leaf nodes, even if the leaf
393   * nodes have been accessed more recently. This may be a better
394   * configuration for databases in which only a very small portion of
395   * the data is cached.
396   *
397   * @return Returns the value of the "db-evictor-lru-only" property.
398   */
399  boolean isDBEvictorLruOnly();
400
401
402
403  /**
404   * Sets the "db-evictor-lru-only" property.
405   * <p>
406   * Indicates whether the database should evict existing data from
407   * the cache based on an LRU policy (where the least recently used
408   * information will be evicted first).
409   * <p>
410   * If set to "false", then the eviction keeps internal nodes of the
411   * underlying Btree in the cache over leaf nodes, even if the leaf
412   * nodes have been accessed more recently. This may be a better
413   * configuration for databases in which only a very small portion of
414   * the data is cached.
415   *
416   * @param value The value of the "db-evictor-lru-only" property.
417   * @throws PropertyException
418   *           If the new value is invalid.
419   */
420  void setDBEvictorLruOnly(Boolean value) throws PropertyException;
421
422
423
424  /**
425   * Gets the "db-evictor-max-threads" property.
426   * <p>
427   * Specifies the maximum number of threads in the eviction thread
428   * pool.
429   * <p>
430   * Specifies the maximum number of threads in the eviction thread
431   * pool. These threads help keep memory usage within cache bounds,
432   * offloading work from application threads. db-evictor-core-threads,
433   * db-evictor-max-threads and db-evictor-keep-alive are used to
434   * configure the core, max and keepalive attributes for the eviction
435   * thread pool.
436   *
437   * @return Returns the value of the "db-evictor-max-threads" property.
438   */
439  int getDBEvictorMaxThreads();
440
441
442
443  /**
444   * Sets the "db-evictor-max-threads" property.
445   * <p>
446   * Specifies the maximum number of threads in the eviction thread
447   * pool.
448   * <p>
449   * Specifies the maximum number of threads in the eviction thread
450   * pool. These threads help keep memory usage within cache bounds,
451   * offloading work from application threads. db-evictor-core-threads,
452   * db-evictor-max-threads and db-evictor-keep-alive are used to
453   * configure the core, max and keepalive attributes for the eviction
454   * thread pool.
455   *
456   * @param value The value of the "db-evictor-max-threads" property.
457   * @throws PropertyException
458   *           If the new value is invalid.
459   */
460  void setDBEvictorMaxThreads(Integer value) throws PropertyException;
461
462
463
464  /**
465   * Gets the "db-evictor-nodes-per-scan" property.
466   * <p>
467   * Specifies the number of Btree nodes that should be evicted from
468   * the cache in a single pass if it is determined that it is
469   * necessary to free existing data in order to make room for new
470   * information.
471   * <p>
472   * Changes to this property do not take effect until the backend is
473   * restarted. It is recommended that you also change this property
474   * when you set db-evictor-lru-only to false. This setting controls
475   * the number of Btree nodes that are considered, or sampled, each
476   * time a node is evicted. A setting of 10 often produces good
477   * results, but this may vary from application to application. The
478   * larger the nodes per scan, the more accurate the algorithm.
479   * However, don't set it too high. When considering larger numbers of
480   * nodes for each eviction, the evictor may delay the completion of a
481   * given database operation, which impacts the response time of the
482   * application thread. In JE 4.1 and later, setting this value too
483   * high in an application that is largely CPU bound can reduce the
484   * effectiveness of cache eviction. It's best to start with the
485   * default value, and increase it gradually to see if it is
486   * beneficial for your application.
487   *
488   * @return Returns the value of the "db-evictor-nodes-per-scan" property.
489   */
490  int getDBEvictorNodesPerScan();
491
492
493
494  /**
495   * Sets the "db-evictor-nodes-per-scan" property.
496   * <p>
497   * Specifies the number of Btree nodes that should be evicted from
498   * the cache in a single pass if it is determined that it is
499   * necessary to free existing data in order to make room for new
500   * information.
501   * <p>
502   * Changes to this property do not take effect until the backend is
503   * restarted. It is recommended that you also change this property
504   * when you set db-evictor-lru-only to false. This setting controls
505   * the number of Btree nodes that are considered, or sampled, each
506   * time a node is evicted. A setting of 10 often produces good
507   * results, but this may vary from application to application. The
508   * larger the nodes per scan, the more accurate the algorithm.
509   * However, don't set it too high. When considering larger numbers of
510   * nodes for each eviction, the evictor may delay the completion of a
511   * given database operation, which impacts the response time of the
512   * application thread. In JE 4.1 and later, setting this value too
513   * high in an application that is largely CPU bound can reduce the
514   * effectiveness of cache eviction. It's best to start with the
515   * default value, and increase it gradually to see if it is
516   * beneficial for your application.
517   *
518   * @param value The value of the "db-evictor-nodes-per-scan" property.
519   * @throws PropertyException
520   *           If the new value is invalid.
521   */
522  void setDBEvictorNodesPerScan(Integer value) throws PropertyException;
523
524
525
526  /**
527   * Gets the "db-log-filecache-size" property.
528   * <p>
529   * Specifies the size of the file handle cache.
530   * <p>
531   * The file handle cache is used to keep as much opened log files as
532   * possible. When the cache is smaller than the number of logs, the
533   * database needs to close some handles and open log files it needs,
534   * resulting in less optimal performances. Ideally, the size of the
535   * cache should be higher than the number of files contained in the
536   * database. Make sure the OS number of open files per process is
537   * also tuned appropriately.
538   *
539   * @return Returns the value of the "db-log-filecache-size" property.
540   */
541  int getDBLogFilecacheSize();
542
543
544
545  /**
546   * Sets the "db-log-filecache-size" property.
547   * <p>
548   * Specifies the size of the file handle cache.
549   * <p>
550   * The file handle cache is used to keep as much opened log files as
551   * possible. When the cache is smaller than the number of logs, the
552   * database needs to close some handles and open log files it needs,
553   * resulting in less optimal performances. Ideally, the size of the
554   * cache should be higher than the number of files contained in the
555   * database. Make sure the OS number of open files per process is
556   * also tuned appropriately.
557   *
558   * @param value The value of the "db-log-filecache-size" property.
559   * @throws PropertyException
560   *           If the new value is invalid.
561   */
562  void setDBLogFilecacheSize(Integer value) throws PropertyException;
563
564
565
566  /**
567   * Gets the "db-log-file-max" property.
568   * <p>
569   * Specifies the maximum size for a database log file.
570   *
571   * @return Returns the value of the "db-log-file-max" property.
572   */
573  long getDBLogFileMax();
574
575
576
577  /**
578   * Sets the "db-log-file-max" property.
579   * <p>
580   * Specifies the maximum size for a database log file.
581   *
582   * @param value The value of the "db-log-file-max" property.
583   * @throws PropertyException
584   *           If the new value is invalid.
585   */
586  void setDBLogFileMax(Long value) throws PropertyException;
587
588
589
590  /**
591   * Gets the "db-logging-file-handler-on" property.
592   * <p>
593   * Indicates whether the database should maintain a je.info file in
594   * the same directory as the database log directory.
595   * <p>
596   * This file contains information about the internal processing
597   * performed by the underlying database.
598   *
599   * @return Returns the value of the "db-logging-file-handler-on" property.
600   */
601  boolean isDBLoggingFileHandlerOn();
602
603
604
605  /**
606   * Sets the "db-logging-file-handler-on" property.
607   * <p>
608   * Indicates whether the database should maintain a je.info file in
609   * the same directory as the database log directory.
610   * <p>
611   * This file contains information about the internal processing
612   * performed by the underlying database.
613   *
614   * @param value The value of the "db-logging-file-handler-on" property.
615   * @throws PropertyException
616   *           If the new value is invalid.
617   */
618  void setDBLoggingFileHandlerOn(Boolean value) throws PropertyException;
619
620
621
622  /**
623   * Gets the "db-logging-level" property.
624   * <p>
625   * Specifies the log level that should be used by the database when
626   * it is writing information into the je.info file.
627   * <p>
628   * The database trace logging level is (in increasing order of
629   * verbosity) chosen from: OFF, SEVERE, WARNING, INFO, CONFIG, FINE,
630   * FINER, FINEST, ALL.
631   *
632   * @return Returns the value of the "db-logging-level" property.
633   */
634  String getDBLoggingLevel();
635
636
637
638  /**
639   * Sets the "db-logging-level" property.
640   * <p>
641   * Specifies the log level that should be used by the database when
642   * it is writing information into the je.info file.
643   * <p>
644   * The database trace logging level is (in increasing order of
645   * verbosity) chosen from: OFF, SEVERE, WARNING, INFO, CONFIG, FINE,
646   * FINER, FINEST, ALL.
647   *
648   * @param value The value of the "db-logging-level" property.
649   * @throws PropertyException
650   *           If the new value is invalid.
651   */
652  void setDBLoggingLevel(String value) throws PropertyException;
653
654
655
656  /**
657   * Gets the "db-num-cleaner-threads" property.
658   * <p>
659   * Specifies the number of threads that the backend should maintain
660   * to keep the database log files at or near the desired utilization.
661   * <p>
662   * In environments with high write throughput, multiple cleaner
663   * threads may be required to maintain the desired utilization.
664   *
665   * @return Returns the value of the "db-num-cleaner-threads" property.
666   */
667  Integer getDBNumCleanerThreads();
668
669
670
671  /**
672   * Sets the "db-num-cleaner-threads" property.
673   * <p>
674   * Specifies the number of threads that the backend should maintain
675   * to keep the database log files at or near the desired utilization.
676   * <p>
677   * In environments with high write throughput, multiple cleaner
678   * threads may be required to maintain the desired utilization.
679   *
680   * @param value The value of the "db-num-cleaner-threads" property.
681   * @throws PropertyException
682   *           If the new value is invalid.
683   */
684  void setDBNumCleanerThreads(Integer value) throws PropertyException;
685
686
687
688  /**
689   * Gets the "db-num-lock-tables" property.
690   * <p>
691   * Specifies the number of lock tables that are used by the
692   * underlying database.
693   * <p>
694   * This can be particularly important to help improve scalability by
695   * avoiding contention on systems with large numbers of CPUs. The
696   * value of this configuration property should be set to a prime
697   * number that is less than or equal to the number of worker threads
698   * configured for use in the server.
699   *
700   * @return Returns the value of the "db-num-lock-tables" property.
701   */
702  Integer getDBNumLockTables();
703
704
705
706  /**
707   * Sets the "db-num-lock-tables" property.
708   * <p>
709   * Specifies the number of lock tables that are used by the
710   * underlying database.
711   * <p>
712   * This can be particularly important to help improve scalability by
713   * avoiding contention on systems with large numbers of CPUs. The
714   * value of this configuration property should be set to a prime
715   * number that is less than or equal to the number of worker threads
716   * configured for use in the server.
717   *
718   * @param value The value of the "db-num-lock-tables" property.
719   * @throws PropertyException
720   *           If the new value is invalid.
721   */
722  void setDBNumLockTables(Integer value) throws PropertyException;
723
724
725
726  /**
727   * Gets the "db-run-cleaner" property.
728   * <p>
729   * Indicates whether the cleaner threads should be enabled to
730   * compact the database.
731   * <p>
732   * The cleaner threads are used to periodically compact the database
733   * when it reaches a percentage of occupancy lower than the amount
734   * specified by the db-cleaner-min-utilization property. They
735   * identify database files with a low percentage of live data, and
736   * relocate their remaining live data to the end of the log.
737   *
738   * @return Returns the value of the "db-run-cleaner" property.
739   */
740  boolean isDBRunCleaner();
741
742
743
744  /**
745   * Sets the "db-run-cleaner" property.
746   * <p>
747   * Indicates whether the cleaner threads should be enabled to
748   * compact the database.
749   * <p>
750   * The cleaner threads are used to periodically compact the database
751   * when it reaches a percentage of occupancy lower than the amount
752   * specified by the db-cleaner-min-utilization property. They
753   * identify database files with a low percentage of live data, and
754   * relocate their remaining live data to the end of the log.
755   *
756   * @param value The value of the "db-run-cleaner" property.
757   * @throws PropertyException
758   *           If the new value is invalid.
759   */
760  void setDBRunCleaner(Boolean value) throws PropertyException;
761
762
763
764  /**
765   * Gets the "db-txn-no-sync" property.
766   * <p>
767   * Indicates whether database writes should be primarily written to
768   * an internal buffer but not immediately written to disk.
769   * <p>
770   * Setting the value of this configuration attribute to "true" may
771   * improve write performance but could cause the most recent changes
772   * to be lost if the OpenDJ directory server or the underlying JVM
773   * exits abnormally, or if an OS or hardware failure occurs (a
774   * behavior similar to running with transaction durability disabled
775   * in the Sun Java System Directory Server).
776   *
777   * @return Returns the value of the "db-txn-no-sync" property.
778   */
779  boolean isDBTxnNoSync();
780
781
782
783  /**
784   * Sets the "db-txn-no-sync" property.
785   * <p>
786   * Indicates whether database writes should be primarily written to
787   * an internal buffer but not immediately written to disk.
788   * <p>
789   * Setting the value of this configuration attribute to "true" may
790   * improve write performance but could cause the most recent changes
791   * to be lost if the OpenDJ directory server or the underlying JVM
792   * exits abnormally, or if an OS or hardware failure occurs (a
793   * behavior similar to running with transaction durability disabled
794   * in the Sun Java System Directory Server).
795   *
796   * @param value The value of the "db-txn-no-sync" property.
797   * @throws PropertyException
798   *           If the new value is invalid.
799   */
800  void setDBTxnNoSync(Boolean value) throws PropertyException;
801
802
803
804  /**
805   * Gets the "db-txn-write-no-sync" property.
806   * <p>
807   * Indicates whether the database should synchronously flush data as
808   * it is written to disk.
809   * <p>
810   * If this value is set to "false", then all data written to disk is
811   * synchronously flushed to persistent storage and thereby providing
812   * full durability. If it is set to "true", then data may be cached
813   * for a period of time by the underlying operating system before
814   * actually being written to disk. This may improve performance, but
815   * could cause the most recent changes to be lost in the event of an
816   * underlying OS or hardware failure (but not in the case that the
817   * OpenDJ directory server or the JVM exits abnormally).
818   *
819   * @return Returns the value of the "db-txn-write-no-sync" property.
820   */
821  boolean isDBTxnWriteNoSync();
822
823
824
825  /**
826   * Sets the "db-txn-write-no-sync" property.
827   * <p>
828   * Indicates whether the database should synchronously flush data as
829   * it is written to disk.
830   * <p>
831   * If this value is set to "false", then all data written to disk is
832   * synchronously flushed to persistent storage and thereby providing
833   * full durability. If it is set to "true", then data may be cached
834   * for a period of time by the underlying operating system before
835   * actually being written to disk. This may improve performance, but
836   * could cause the most recent changes to be lost in the event of an
837   * underlying OS or hardware failure (but not in the case that the
838   * OpenDJ directory server or the JVM exits abnormally).
839   *
840   * @param value The value of the "db-txn-write-no-sync" property.
841   * @throws PropertyException
842   *           If the new value is invalid.
843   */
844  void setDBTxnWriteNoSync(Boolean value) throws PropertyException;
845
846
847
848  /**
849   * Gets the "disk-full-threshold" property.
850   * <p>
851   * Full disk threshold to limit database updates
852   * <p>
853   * When the available free space on the disk used by this database
854   * instance falls below the value specified, no updates are permitted
855   * and the server returns an UNWILLING_TO_PERFORM error. Updates are
856   * allowed again as soon as free space rises above the threshold.
857   *
858   * @return Returns the value of the "disk-full-threshold" property.
859   */
860  long getDiskFullThreshold();
861
862
863
864  /**
865   * Sets the "disk-full-threshold" property.
866   * <p>
867   * Full disk threshold to limit database updates
868   * <p>
869   * When the available free space on the disk used by this database
870   * instance falls below the value specified, no updates are permitted
871   * and the server returns an UNWILLING_TO_PERFORM error. Updates are
872   * allowed again as soon as free space rises above the threshold.
873   *
874   * @param value The value of the "disk-full-threshold" property.
875   * @throws PropertyException
876   *           If the new value is invalid.
877   */
878  void setDiskFullThreshold(Long value) throws PropertyException;
879
880
881
882  /**
883   * Gets the "disk-low-threshold" property.
884   * <p>
885   * Low disk threshold to limit database updates
886   * <p>
887   * Specifies the "low" free space on the disk. When the available
888   * free space on the disk used by this database instance falls below
889   * the value specified, protocol updates on this database are
890   * permitted only by a user with the BYPASS_LOCKDOWN privilege.
891   *
892   * @return Returns the value of the "disk-low-threshold" property.
893   */
894  long getDiskLowThreshold();
895
896
897
898  /**
899   * Sets the "disk-low-threshold" property.
900   * <p>
901   * Low disk threshold to limit database updates
902   * <p>
903   * Specifies the "low" free space on the disk. When the available
904   * free space on the disk used by this database instance falls below
905   * the value specified, protocol updates on this database are
906   * permitted only by a user with the BYPASS_LOCKDOWN privilege.
907   *
908   * @param value The value of the "disk-low-threshold" property.
909   * @throws PropertyException
910   *           If the new value is invalid.
911   */
912  void setDiskLowThreshold(Long value) throws PropertyException;
913
914
915
916  /**
917   * Gets the "java-class" property.
918   * <p>
919   * Specifies the fully-qualified name of the Java class that
920   * provides the backend implementation.
921   *
922   * @return Returns the value of the "java-class" property.
923   */
924  String getJavaClass();
925
926
927
928  /**
929   * Sets the "java-class" property.
930   * <p>
931   * Specifies the fully-qualified name of the Java class that
932   * provides the backend implementation.
933   *
934   * @param value The value of the "java-class" property.
935   * @throws PropertyException
936   *           If the new value is invalid.
937   */
938  void setJavaClass(String value) throws PropertyException;
939
940
941
942  /**
943   * Gets the "je-property" property.
944   * <p>
945   * Specifies the database and environment properties for the
946   * Berkeley DB Java Edition database serving the data for this
947   * backend.
948   * <p>
949   * Any Berkeley DB Java Edition property can be specified using the
950   * following form: property-name=property-value. Refer to OpenDJ
951   * documentation for further information on related properties, their
952   * implications, and range values. The definitive identification of
953   * all the property parameters is available in the example.properties
954   * file of Berkeley DB Java Edition distribution.
955   *
956   * @return Returns the values of the "je-property" property.
957   */
958  SortedSet<String> getJEProperty();
959
960
961
962  /**
963   * Sets the "je-property" property.
964   * <p>
965   * Specifies the database and environment properties for the
966   * Berkeley DB Java Edition database serving the data for this
967   * backend.
968   * <p>
969   * Any Berkeley DB Java Edition property can be specified using the
970   * following form: property-name=property-value. Refer to OpenDJ
971   * documentation for further information on related properties, their
972   * implications, and range values. The definitive identification of
973   * all the property parameters is available in the example.properties
974   * file of Berkeley DB Java Edition distribution.
975   *
976   * @param values The values of the "je-property" property.
977   * @throws PropertyException
978   *           If one or more of the new values are invalid.
979   */
980  void setJEProperty(Collection<String> values) throws PropertyException;
981
982}