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.forgerock.opendj.server.config.meta;
027
028
029
030import java.util.Collection;
031import java.util.SortedSet;
032import org.forgerock.opendj.config.AdministratorAction;
033import org.forgerock.opendj.config.AliasDefaultBehaviorProvider;
034import org.forgerock.opendj.config.BooleanPropertyDefinition;
035import org.forgerock.opendj.config.ClassPropertyDefinition;
036import org.forgerock.opendj.config.client.ConcurrentModificationException;
037import org.forgerock.opendj.config.client.IllegalManagedObjectNameException;
038import org.forgerock.opendj.config.client.ManagedObject;
039import org.forgerock.opendj.config.client.ManagedObjectDecodingException;
040import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException;
041import org.forgerock.opendj.config.client.OperationRejectedException;
042import org.forgerock.opendj.config.conditions.Conditions;
043import org.forgerock.opendj.config.DefaultBehaviorProvider;
044import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
045import org.forgerock.opendj.config.DefinitionDecodingException;
046import org.forgerock.opendj.config.DNPropertyDefinition;
047import org.forgerock.opendj.config.DurationPropertyDefinition;
048import org.forgerock.opendj.config.EnumPropertyDefinition;
049import org.forgerock.opendj.config.GenericConstraint;
050import org.forgerock.opendj.config.InstantiableRelationDefinition;
051import org.forgerock.opendj.config.IntegerPropertyDefinition;
052import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
053import org.forgerock.opendj.config.ManagedObjectDefinition;
054import org.forgerock.opendj.config.ManagedObjectNotFoundException;
055import org.forgerock.opendj.config.PropertyException;
056import org.forgerock.opendj.config.PropertyOption;
057import org.forgerock.opendj.config.PropertyProvider;
058import org.forgerock.opendj.config.server.ConfigException;
059import org.forgerock.opendj.config.server.ConfigurationAddListener;
060import org.forgerock.opendj.config.server.ConfigurationChangeListener;
061import org.forgerock.opendj.config.server.ConfigurationDeleteListener;
062import org.forgerock.opendj.config.server.ServerManagedObject;
063import org.forgerock.opendj.config.SizePropertyDefinition;
064import org.forgerock.opendj.config.StringPropertyDefinition;
065import org.forgerock.opendj.config.Tag;
066import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
067import org.forgerock.opendj.ldap.DN;
068import org.forgerock.opendj.ldap.LdapException;
069import org.forgerock.opendj.server.config.client.BackendIndexCfgClient;
070import org.forgerock.opendj.server.config.client.BackendVLVIndexCfgClient;
071import org.forgerock.opendj.server.config.client.JEBackendCfgClient;
072import org.forgerock.opendj.server.config.meta.BackendCfgDefn.WritabilityMode;
073import org.forgerock.opendj.server.config.server.BackendCfg;
074import org.forgerock.opendj.server.config.server.BackendIndexCfg;
075import org.forgerock.opendj.server.config.server.BackendVLVIndexCfg;
076import org.forgerock.opendj.server.config.server.JEBackendCfg;
077import org.forgerock.opendj.server.config.server.PluggableBackendCfg;
078
079
080
081/**
082 * An interface for querying the JE Backend managed object definition
083 * meta information.
084 * <p>
085 * A JE Backend stores application data in a Berkeley DB Java Edition
086 * database.
087 */
088public final class JEBackendCfgDefn extends ManagedObjectDefinition<JEBackendCfgClient, JEBackendCfg> {
089
090  /** The singleton configuration definition instance. */
091  private static final JEBackendCfgDefn INSTANCE = new JEBackendCfgDefn();
092
093
094
095  /** The "db-cache-percent" property definition. */
096  private static final IntegerPropertyDefinition PD_DB_CACHE_PERCENT;
097
098
099
100  /** The "db-cache-size" property definition. */
101  private static final SizePropertyDefinition PD_DB_CACHE_SIZE;
102
103
104
105  /** The "db-checkpointer-bytes-interval" property definition. */
106  private static final SizePropertyDefinition PD_DB_CHECKPOINTER_BYTES_INTERVAL;
107
108
109
110  /** The "db-checkpointer-wakeup-interval" property definition. */
111  private static final DurationPropertyDefinition PD_DB_CHECKPOINTER_WAKEUP_INTERVAL;
112
113
114
115  /** The "db-cleaner-min-utilization" property definition. */
116  private static final IntegerPropertyDefinition PD_DB_CLEANER_MIN_UTILIZATION;
117
118
119
120  /** The "db-directory" property definition. */
121  private static final StringPropertyDefinition PD_DB_DIRECTORY;
122
123
124
125  /** The "db-directory-permissions" property definition. */
126  private static final StringPropertyDefinition PD_DB_DIRECTORY_PERMISSIONS;
127
128
129
130  /** The "db-evictor-core-threads" property definition. */
131  private static final IntegerPropertyDefinition PD_DB_EVICTOR_CORE_THREADS;
132
133
134
135  /** The "db-evictor-keep-alive" property definition. */
136  private static final DurationPropertyDefinition PD_DB_EVICTOR_KEEP_ALIVE;
137
138
139
140  /** The "db-evictor-lru-only" property definition. */
141  private static final BooleanPropertyDefinition PD_DB_EVICTOR_LRU_ONLY;
142
143
144
145  /** The "db-evictor-max-threads" property definition. */
146  private static final IntegerPropertyDefinition PD_DB_EVICTOR_MAX_THREADS;
147
148
149
150  /** The "db-evictor-nodes-per-scan" property definition. */
151  private static final IntegerPropertyDefinition PD_DB_EVICTOR_NODES_PER_SCAN;
152
153
154
155  /** The "db-log-filecache-size" property definition. */
156  private static final IntegerPropertyDefinition PD_DB_LOG_FILECACHE_SIZE;
157
158
159
160  /** The "db-log-file-max" property definition. */
161  private static final SizePropertyDefinition PD_DB_LOG_FILE_MAX;
162
163
164
165  /** The "db-logging-file-handler-on" property definition. */
166  private static final BooleanPropertyDefinition PD_DB_LOGGING_FILE_HANDLER_ON;
167
168
169
170  /** The "db-logging-level" property definition. */
171  private static final StringPropertyDefinition PD_DB_LOGGING_LEVEL;
172
173
174
175  /** The "db-num-cleaner-threads" property definition. */
176  private static final IntegerPropertyDefinition PD_DB_NUM_CLEANER_THREADS;
177
178
179
180  /** The "db-num-lock-tables" property definition. */
181  private static final IntegerPropertyDefinition PD_DB_NUM_LOCK_TABLES;
182
183
184
185  /** The "db-run-cleaner" property definition. */
186  private static final BooleanPropertyDefinition PD_DB_RUN_CLEANER;
187
188
189
190  /** The "db-txn-no-sync" property definition. */
191  private static final BooleanPropertyDefinition PD_DB_TXN_NO_SYNC;
192
193
194
195  /** The "db-txn-write-no-sync" property definition. */
196  private static final BooleanPropertyDefinition PD_DB_TXN_WRITE_NO_SYNC;
197
198
199
200  /** The "disk-full-threshold" property definition. */
201  private static final SizePropertyDefinition PD_DISK_FULL_THRESHOLD;
202
203
204
205  /** The "disk-low-threshold" property definition. */
206  private static final SizePropertyDefinition PD_DISK_LOW_THRESHOLD;
207
208
209
210  /** The "java-class" property definition. */
211  private static final ClassPropertyDefinition PD_JAVA_CLASS;
212
213
214
215  /** The "je-property" property definition. */
216  private static final StringPropertyDefinition PD_JE_PROPERTY;
217
218
219
220  /** Build the "db-cache-percent" property definition. */
221  static {
222      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "db-cache-percent");
223      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-cache-percent"));
224      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("50");
225      builder.setDefaultBehaviorProvider(provider);
226      builder.setUpperLimit(90);
227      builder.setLowerLimit(1);
228      PD_DB_CACHE_PERCENT = builder.getInstance();
229      INSTANCE.registerPropertyDefinition(PD_DB_CACHE_PERCENT);
230  }
231
232
233
234  /** Build the "db-cache-size" property definition. */
235  static {
236      SizePropertyDefinition.Builder builder = SizePropertyDefinition.createBuilder(INSTANCE, "db-cache-size");
237      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-cache-size"));
238      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("0 MB");
239      builder.setDefaultBehaviorProvider(provider);
240      builder.setLowerLimit("0 MB");
241      PD_DB_CACHE_SIZE = builder.getInstance();
242      INSTANCE.registerPropertyDefinition(PD_DB_CACHE_SIZE);
243  }
244
245
246
247  /** Build the "db-checkpointer-bytes-interval" property definition. */
248  static {
249      SizePropertyDefinition.Builder builder = SizePropertyDefinition.createBuilder(INSTANCE, "db-checkpointer-bytes-interval");
250      builder.setOption(PropertyOption.ADVANCED);
251      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.SERVER_RESTART, INSTANCE, "db-checkpointer-bytes-interval"));
252      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("500mb");
253      builder.setDefaultBehaviorProvider(provider);
254      builder.setUpperLimit("9223372036854775807b");
255      builder.setLowerLimit("0b");
256      PD_DB_CHECKPOINTER_BYTES_INTERVAL = builder.getInstance();
257      INSTANCE.registerPropertyDefinition(PD_DB_CHECKPOINTER_BYTES_INTERVAL);
258  }
259
260
261
262  /** Build the "db-checkpointer-wakeup-interval" property definition. */
263  static {
264      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "db-checkpointer-wakeup-interval");
265      builder.setOption(PropertyOption.ADVANCED);
266      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-checkpointer-wakeup-interval"));
267      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("30s");
268      builder.setDefaultBehaviorProvider(provider);
269      builder.setBaseUnit("s");
270      builder.setUpperLimit("4294");
271      builder.setLowerLimit("1");
272      PD_DB_CHECKPOINTER_WAKEUP_INTERVAL = builder.getInstance();
273      INSTANCE.registerPropertyDefinition(PD_DB_CHECKPOINTER_WAKEUP_INTERVAL);
274  }
275
276
277
278  /** Build the "db-cleaner-min-utilization" property definition. */
279  static {
280      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "db-cleaner-min-utilization");
281      builder.setOption(PropertyOption.ADVANCED);
282      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-cleaner-min-utilization"));
283      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("50");
284      builder.setDefaultBehaviorProvider(provider);
285      builder.setUpperLimit(90);
286      builder.setLowerLimit(0);
287      PD_DB_CLEANER_MIN_UTILIZATION = builder.getInstance();
288      INSTANCE.registerPropertyDefinition(PD_DB_CLEANER_MIN_UTILIZATION);
289  }
290
291
292
293  /** Build the "db-directory" property definition. */
294  static {
295      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "db-directory");
296      builder.setOption(PropertyOption.MANDATORY);
297      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-directory"));
298      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("db");
299      builder.setDefaultBehaviorProvider(provider);
300      PD_DB_DIRECTORY = builder.getInstance();
301      INSTANCE.registerPropertyDefinition(PD_DB_DIRECTORY);
302  }
303
304
305
306  /** Build the "db-directory-permissions" property definition. */
307  static {
308      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "db-directory-permissions");
309      builder.setOption(PropertyOption.ADVANCED);
310      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.SERVER_RESTART, INSTANCE, "db-directory-permissions"));
311      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("700");
312      builder.setDefaultBehaviorProvider(provider);
313      builder.setPattern("^7[0-7][0-7]$", "MODE");
314      PD_DB_DIRECTORY_PERMISSIONS = builder.getInstance();
315      INSTANCE.registerPropertyDefinition(PD_DB_DIRECTORY_PERMISSIONS);
316  }
317
318
319
320  /** Build the "db-evictor-core-threads" property definition. */
321  static {
322      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "db-evictor-core-threads");
323      builder.setOption(PropertyOption.ADVANCED);
324      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-evictor-core-threads"));
325      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("1");
326      builder.setDefaultBehaviorProvider(provider);
327      builder.setUpperLimit(2147483647);
328      builder.setLowerLimit(0);
329      PD_DB_EVICTOR_CORE_THREADS = builder.getInstance();
330      INSTANCE.registerPropertyDefinition(PD_DB_EVICTOR_CORE_THREADS);
331  }
332
333
334
335  /** Build the "db-evictor-keep-alive" property definition. */
336  static {
337      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "db-evictor-keep-alive");
338      builder.setOption(PropertyOption.ADVANCED);
339      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-evictor-keep-alive"));
340      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("600s");
341      builder.setDefaultBehaviorProvider(provider);
342      builder.setBaseUnit("s");
343      builder.setUpperLimit("86400");
344      builder.setLowerLimit("1");
345      PD_DB_EVICTOR_KEEP_ALIVE = builder.getInstance();
346      INSTANCE.registerPropertyDefinition(PD_DB_EVICTOR_KEEP_ALIVE);
347  }
348
349
350
351  /** Build the "db-evictor-lru-only" property definition. */
352  static {
353      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "db-evictor-lru-only");
354      builder.setOption(PropertyOption.ADVANCED);
355      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-evictor-lru-only"));
356      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
357      builder.setDefaultBehaviorProvider(provider);
358      PD_DB_EVICTOR_LRU_ONLY = builder.getInstance();
359      INSTANCE.registerPropertyDefinition(PD_DB_EVICTOR_LRU_ONLY);
360  }
361
362
363
364  /** Build the "db-evictor-max-threads" property definition. */
365  static {
366      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "db-evictor-max-threads");
367      builder.setOption(PropertyOption.ADVANCED);
368      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-evictor-max-threads"));
369      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("10");
370      builder.setDefaultBehaviorProvider(provider);
371      builder.setUpperLimit(2147483647);
372      builder.setLowerLimit(1);
373      PD_DB_EVICTOR_MAX_THREADS = builder.getInstance();
374      INSTANCE.registerPropertyDefinition(PD_DB_EVICTOR_MAX_THREADS);
375  }
376
377
378
379  /** Build the "db-evictor-nodes-per-scan" property definition. */
380  static {
381      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "db-evictor-nodes-per-scan");
382      builder.setOption(PropertyOption.ADVANCED);
383      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-evictor-nodes-per-scan"));
384      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("10");
385      builder.setDefaultBehaviorProvider(provider);
386      builder.setUpperLimit(1000);
387      builder.setLowerLimit(1);
388      PD_DB_EVICTOR_NODES_PER_SCAN = builder.getInstance();
389      INSTANCE.registerPropertyDefinition(PD_DB_EVICTOR_NODES_PER_SCAN);
390  }
391
392
393
394  /** Build the "db-log-filecache-size" property definition. */
395  static {
396      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "db-log-filecache-size");
397      builder.setOption(PropertyOption.ADVANCED);
398      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-log-filecache-size"));
399      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("100");
400      builder.setDefaultBehaviorProvider(provider);
401      builder.setUpperLimit(2147483647);
402      builder.setLowerLimit(3);
403      PD_DB_LOG_FILECACHE_SIZE = builder.getInstance();
404      INSTANCE.registerPropertyDefinition(PD_DB_LOG_FILECACHE_SIZE);
405  }
406
407
408
409  /** Build the "db-log-file-max" property definition. */
410  static {
411      SizePropertyDefinition.Builder builder = SizePropertyDefinition.createBuilder(INSTANCE, "db-log-file-max");
412      builder.setOption(PropertyOption.ADVANCED);
413      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-log-file-max"));
414      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("100mb");
415      builder.setDefaultBehaviorProvider(provider);
416      builder.setUpperLimit("4gib");
417      builder.setLowerLimit("1mb");
418      PD_DB_LOG_FILE_MAX = builder.getInstance();
419      INSTANCE.registerPropertyDefinition(PD_DB_LOG_FILE_MAX);
420  }
421
422
423
424  /** Build the "db-logging-file-handler-on" property definition. */
425  static {
426      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "db-logging-file-handler-on");
427      builder.setOption(PropertyOption.ADVANCED);
428      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-logging-file-handler-on"));
429      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true");
430      builder.setDefaultBehaviorProvider(provider);
431      PD_DB_LOGGING_FILE_HANDLER_ON = builder.getInstance();
432      INSTANCE.registerPropertyDefinition(PD_DB_LOGGING_FILE_HANDLER_ON);
433  }
434
435
436
437  /** Build the "db-logging-level" property definition. */
438  static {
439      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "db-logging-level");
440      builder.setOption(PropertyOption.ADVANCED);
441      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-logging-level"));
442      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("CONFIG");
443      builder.setDefaultBehaviorProvider(provider);
444      PD_DB_LOGGING_LEVEL = builder.getInstance();
445      INSTANCE.registerPropertyDefinition(PD_DB_LOGGING_LEVEL);
446  }
447
448
449
450  /** Build the "db-num-cleaner-threads" property definition. */
451  static {
452      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "db-num-cleaner-threads");
453      builder.setOption(PropertyOption.ADVANCED);
454      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-num-cleaner-threads"));
455      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<Integer>(INSTANCE, "db-num-cleaner-threads"));
456      builder.setLowerLimit(1);
457      PD_DB_NUM_CLEANER_THREADS = builder.getInstance();
458      INSTANCE.registerPropertyDefinition(PD_DB_NUM_CLEANER_THREADS);
459  }
460
461
462
463  /** Build the "db-num-lock-tables" property definition. */
464  static {
465      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "db-num-lock-tables");
466      builder.setOption(PropertyOption.ADVANCED);
467      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-num-lock-tables"));
468      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<Integer>(INSTANCE, "db-num-lock-tables"));
469      builder.setUpperLimit(32767);
470      builder.setLowerLimit(1);
471      PD_DB_NUM_LOCK_TABLES = builder.getInstance();
472      INSTANCE.registerPropertyDefinition(PD_DB_NUM_LOCK_TABLES);
473  }
474
475
476
477  /** Build the "db-run-cleaner" property definition. */
478  static {
479      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "db-run-cleaner");
480      builder.setOption(PropertyOption.ADVANCED);
481      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-run-cleaner"));
482      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true");
483      builder.setDefaultBehaviorProvider(provider);
484      PD_DB_RUN_CLEANER = builder.getInstance();
485      INSTANCE.registerPropertyDefinition(PD_DB_RUN_CLEANER);
486  }
487
488
489
490  /** Build the "db-txn-no-sync" property definition. */
491  static {
492      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "db-txn-no-sync");
493      builder.setOption(PropertyOption.ADVANCED);
494      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-txn-no-sync"));
495      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
496      builder.setDefaultBehaviorProvider(provider);
497      PD_DB_TXN_NO_SYNC = builder.getInstance();
498      INSTANCE.registerPropertyDefinition(PD_DB_TXN_NO_SYNC);
499  }
500
501
502
503  /** Build the "db-txn-write-no-sync" property definition. */
504  static {
505      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "db-txn-write-no-sync");
506      builder.setOption(PropertyOption.ADVANCED);
507      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-txn-write-no-sync"));
508      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true");
509      builder.setDefaultBehaviorProvider(provider);
510      PD_DB_TXN_WRITE_NO_SYNC = builder.getInstance();
511      INSTANCE.registerPropertyDefinition(PD_DB_TXN_WRITE_NO_SYNC);
512  }
513
514
515
516  /** Build the "disk-full-threshold" property definition. */
517  static {
518      SizePropertyDefinition.Builder builder = SizePropertyDefinition.createBuilder(INSTANCE, "disk-full-threshold");
519      builder.setOption(PropertyOption.ADVANCED);
520      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "disk-full-threshold"));
521      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("100 megabytes");
522      builder.setDefaultBehaviorProvider(provider);
523      builder.setLowerLimit("0");
524      PD_DISK_FULL_THRESHOLD = builder.getInstance();
525      INSTANCE.registerPropertyDefinition(PD_DISK_FULL_THRESHOLD);
526  }
527
528
529
530  /** Build the "disk-low-threshold" property definition. */
531  static {
532      SizePropertyDefinition.Builder builder = SizePropertyDefinition.createBuilder(INSTANCE, "disk-low-threshold");
533      builder.setOption(PropertyOption.ADVANCED);
534      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "disk-low-threshold"));
535      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("200 megabytes");
536      builder.setDefaultBehaviorProvider(provider);
537      builder.setLowerLimit("0");
538      PD_DISK_LOW_THRESHOLD = builder.getInstance();
539      INSTANCE.registerPropertyDefinition(PD_DISK_LOW_THRESHOLD);
540  }
541
542
543
544  /** Build the "java-class" property definition. */
545  static {
546      ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class");
547      builder.setOption(PropertyOption.MANDATORY);
548      builder.setOption(PropertyOption.ADVANCED);
549      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class"));
550      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.backends.jeb.JEBackend");
551      builder.setDefaultBehaviorProvider(provider);
552      builder.addInstanceOf("org.opends.server.api.Backend");
553      PD_JAVA_CLASS = builder.getInstance();
554      INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS);
555  }
556
557
558
559  /** Build the "je-property" property definition. */
560  static {
561      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "je-property");
562      builder.setOption(PropertyOption.MULTI_VALUED);
563      builder.setOption(PropertyOption.ADVANCED);
564      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "je-property"));
565      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
566      PD_JE_PROPERTY = builder.getInstance();
567      INSTANCE.registerPropertyDefinition(PD_JE_PROPERTY);
568  }
569
570
571
572  // Register the tags associated with this managed object definition.
573  static {
574    INSTANCE.registerTag(Tag.valueOf("database"));
575  }
576
577
578
579  // Register the constraints associated with this managed object definition.
580  static {
581    INSTANCE.registerConstraint(new GenericConstraint(INSTANCE, 1, Conditions.implies(Conditions.contains("enabled", "true"), Conditions.not(Conditions.and(Conditions.contains("db-txn-no-sync", "true"), Conditions.contains("db-txn-write-no-sync", "true"))))));
582  }
583
584
585
586  /**
587   * Get the JE Backend configuration definition singleton.
588   *
589   * @return Returns the JE Backend configuration definition
590   *         singleton.
591   */
592  public static JEBackendCfgDefn getInstance() {
593    return INSTANCE;
594  }
595
596
597
598  /**
599   * Private constructor.
600   */
601  private JEBackendCfgDefn() {
602    super("je-backend", PluggableBackendCfgDefn.getInstance());
603  }
604
605
606
607  /** {@inheritDoc} */
608  public JEBackendCfgClient createClientConfiguration(
609      ManagedObject<? extends JEBackendCfgClient> impl) {
610    return new JEBackendCfgClientImpl(impl);
611  }
612
613
614
615  /** {@inheritDoc} */
616  public JEBackendCfg createServerConfiguration(
617      ServerManagedObject<? extends JEBackendCfg> impl) {
618    return new JEBackendCfgServerImpl(impl);
619  }
620
621
622
623  /** {@inheritDoc} */
624  public Class<JEBackendCfg> getServerConfigurationClass() {
625    return JEBackendCfg.class;
626  }
627
628
629
630  /**
631   * Get the "backend-id" property definition.
632   * <p>
633   * Specifies a name to identify the associated backend.
634   * <p>
635   * The name must be unique among all backends in the server. The
636   * backend ID may not be altered after the backend is created in the
637   * server.
638   *
639   * @return Returns the "backend-id" property definition.
640   */
641  public StringPropertyDefinition getBackendIdPropertyDefinition() {
642    return PluggableBackendCfgDefn.getInstance().getBackendIdPropertyDefinition();
643  }
644
645
646
647  /**
648   * Get the "base-dn" property definition.
649   * <p>
650   * Specifies the base DN(s) for the data that the backend handles.
651   * <p>
652   * A single backend may be responsible for one or more base DNs.
653   * Note that no two backends may have the same base DN although one
654   * backend may have a base DN that is below a base DN provided by
655   * another backend (similar to the use of sub-suffixes in the Sun
656   * Java System Directory Server). If any of the base DNs is
657   * subordinate to a base DN for another backend, then all base DNs
658   * for that backend must be subordinate to that same base DN.
659   *
660   * @return Returns the "base-dn" property definition.
661   */
662  public DNPropertyDefinition getBaseDNPropertyDefinition() {
663    return PluggableBackendCfgDefn.getInstance().getBaseDNPropertyDefinition();
664  }
665
666
667
668  /**
669   * Get the "compact-encoding" property definition.
670   * <p>
671   * Indicates whether the backend should use a compact form when
672   * encoding entries by compressing the attribute descriptions and
673   * object class sets.
674   * <p>
675   * Note that this property applies only to the entries themselves
676   * and does not impact the index data.
677   *
678   * @return Returns the "compact-encoding" property definition.
679   */
680  public BooleanPropertyDefinition getCompactEncodingPropertyDefinition() {
681    return PluggableBackendCfgDefn.getInstance().getCompactEncodingPropertyDefinition();
682  }
683
684
685
686  /**
687   * Get the "db-cache-percent" property definition.
688   * <p>
689   * Specifies the percentage of JVM memory to allocate to the
690   * database cache.
691   * <p>
692   * Specifies the percentage of memory available to the JVM that
693   * should be used for caching database contents. Note that this is
694   * only used if the value of the db-cache-size property is set to "0
695   * MB". Otherwise, the value of that property is used instead to
696   * control the cache size configuration.
697   *
698   * @return Returns the "db-cache-percent" property definition.
699   */
700  public IntegerPropertyDefinition getDBCachePercentPropertyDefinition() {
701    return PD_DB_CACHE_PERCENT;
702  }
703
704
705
706  /**
707   * Get the "db-cache-size" property definition.
708   * <p>
709   * The amount of JVM memory to allocate to the database cache.
710   * <p>
711   * Specifies the amount of memory that should be used for caching
712   * database contents. A value of "0 MB" indicates that the
713   * db-cache-percent property should be used instead to specify the
714   * cache size.
715   *
716   * @return Returns the "db-cache-size" property definition.
717   */
718  public SizePropertyDefinition getDBCacheSizePropertyDefinition() {
719    return PD_DB_CACHE_SIZE;
720  }
721
722
723
724  /**
725   * Get the "db-checkpointer-bytes-interval" property definition.
726   * <p>
727   * Specifies the maximum number of bytes that may be written to the
728   * database before it is forced to perform a checkpoint.
729   * <p>
730   * This can be used to bound the recovery time that may be required
731   * if the database environment is opened without having been properly
732   * closed. If this property is set to a non-zero value, the
733   * checkpointer wakeup interval is not used. To use time-based
734   * checkpointing, set this property to zero.
735   *
736   * @return Returns the "db-checkpointer-bytes-interval" property definition.
737   */
738  public SizePropertyDefinition getDBCheckpointerBytesIntervalPropertyDefinition() {
739    return PD_DB_CHECKPOINTER_BYTES_INTERVAL;
740  }
741
742
743
744  /**
745   * Get the "db-checkpointer-wakeup-interval" property definition.
746   * <p>
747   * Specifies the maximum length of time that may pass between
748   * checkpoints.
749   * <p>
750   * Note that this is only used if the value of the checkpointer
751   * bytes interval is zero.
752   *
753   * @return Returns the "db-checkpointer-wakeup-interval" property definition.
754   */
755  public DurationPropertyDefinition getDBCheckpointerWakeupIntervalPropertyDefinition() {
756    return PD_DB_CHECKPOINTER_WAKEUP_INTERVAL;
757  }
758
759
760
761  /**
762   * Get the "db-cleaner-min-utilization" property definition.
763   * <p>
764   * Specifies the occupancy percentage for "live" data in this
765   * backend's database.
766   * <p>
767   * When the amount of "live" data in the database drops below this
768   * value, cleaners will act to increase the occupancy percentage by
769   * compacting the database.
770   *
771   * @return Returns the "db-cleaner-min-utilization" property definition.
772   */
773  public IntegerPropertyDefinition getDBCleanerMinUtilizationPropertyDefinition() {
774    return PD_DB_CLEANER_MIN_UTILIZATION;
775  }
776
777
778
779  /**
780   * Get the "db-directory" property definition.
781   * <p>
782   * Specifies the path to the filesystem directory that is used to
783   * hold the Berkeley DB Java Edition database files containing the
784   * data for this backend.
785   * <p>
786   * The path may be either an absolute path or a path relative to the
787   * directory containing the base of the OpenDJ directory server
788   * installation. The path may be any valid directory path in which
789   * the server has appropriate permissions to read and write files and
790   * has sufficient space to hold the database contents.
791   *
792   * @return Returns the "db-directory" property definition.
793   */
794  public StringPropertyDefinition getDBDirectoryPropertyDefinition() {
795    return PD_DB_DIRECTORY;
796  }
797
798
799
800  /**
801   * Get the "db-directory-permissions" property definition.
802   * <p>
803   * Specifies the permissions that should be applied to the directory
804   * containing the server database files.
805   * <p>
806   * They should be expressed as three-digit octal values, which is
807   * the traditional representation for UNIX file permissions. The
808   * three digits represent the permissions that are available for the
809   * directory's owner, group members, and other users (in that order),
810   * and each digit is the octal representation of the read, write, and
811   * execute bits. Note that this only impacts permissions on the
812   * database directory and not on the files written into that
813   * directory. On UNIX systems, the user's umask controls permissions
814   * given to the database files.
815   *
816   * @return Returns the "db-directory-permissions" property definition.
817   */
818  public StringPropertyDefinition getDBDirectoryPermissionsPropertyDefinition() {
819    return PD_DB_DIRECTORY_PERMISSIONS;
820  }
821
822
823
824  /**
825   * Get the "db-evictor-core-threads" property definition.
826   * <p>
827   * Specifies the core number of threads in the eviction thread pool.
828   * <p>
829   * Specifies the core number of threads in the eviction thread pool.
830   * These threads help keep memory usage within cache bounds,
831   * offloading work from application threads. db-evictor-core-threads,
832   * db-evictor-max-threads and db-evictor-keep-alive are used to
833   * configure the core, max and keepalive attributes for the eviction
834   * thread pool.
835   *
836   * @return Returns the "db-evictor-core-threads" property definition.
837   */
838  public IntegerPropertyDefinition getDBEvictorCoreThreadsPropertyDefinition() {
839    return PD_DB_EVICTOR_CORE_THREADS;
840  }
841
842
843
844  /**
845   * Get the "db-evictor-keep-alive" property definition.
846   * <p>
847   * The duration that excess threads in the eviction thread pool will
848   * stay idle. After this period, idle threads will terminate.
849   * <p>
850   * The duration that excess threads in the eviction thread pool will
851   * stay idle. After this period, idle threads will terminate.
852   * db-evictor-core-threads, db-evictor-max-threads and
853   * db-evictor-keep-alive are used to configure the core, max and
854   * keepalive attributes for the eviction thread pool.
855   *
856   * @return Returns the "db-evictor-keep-alive" property definition.
857   */
858  public DurationPropertyDefinition getDBEvictorKeepAlivePropertyDefinition() {
859    return PD_DB_EVICTOR_KEEP_ALIVE;
860  }
861
862
863
864  /**
865   * Get the "db-evictor-lru-only" property definition.
866   * <p>
867   * Indicates whether the database should evict existing data from
868   * the cache based on an LRU policy (where the least recently used
869   * information will be evicted first).
870   * <p>
871   * If set to "false", then the eviction keeps internal nodes of the
872   * underlying Btree in the cache over leaf nodes, even if the leaf
873   * nodes have been accessed more recently. This may be a better
874   * configuration for databases in which only a very small portion of
875   * the data is cached.
876   *
877   * @return Returns the "db-evictor-lru-only" property definition.
878   */
879  public BooleanPropertyDefinition getDBEvictorLruOnlyPropertyDefinition() {
880    return PD_DB_EVICTOR_LRU_ONLY;
881  }
882
883
884
885  /**
886   * Get the "db-evictor-max-threads" property definition.
887   * <p>
888   * Specifies the maximum number of threads in the eviction thread
889   * pool.
890   * <p>
891   * Specifies the maximum number of threads in the eviction thread
892   * pool. These threads help keep memory usage within cache bounds,
893   * offloading work from application threads. db-evictor-core-threads,
894   * db-evictor-max-threads and db-evictor-keep-alive are used to
895   * configure the core, max and keepalive attributes for the eviction
896   * thread pool.
897   *
898   * @return Returns the "db-evictor-max-threads" property definition.
899   */
900  public IntegerPropertyDefinition getDBEvictorMaxThreadsPropertyDefinition() {
901    return PD_DB_EVICTOR_MAX_THREADS;
902  }
903
904
905
906  /**
907   * Get the "db-evictor-nodes-per-scan" property definition.
908   * <p>
909   * Specifies the number of Btree nodes that should be evicted from
910   * the cache in a single pass if it is determined that it is
911   * necessary to free existing data in order to make room for new
912   * information.
913   * <p>
914   * Changes to this property do not take effect until the backend is
915   * restarted. It is recommended that you also change this property
916   * when you set db-evictor-lru-only to false. This setting controls
917   * the number of Btree nodes that are considered, or sampled, each
918   * time a node is evicted. A setting of 10 often produces good
919   * results, but this may vary from application to application. The
920   * larger the nodes per scan, the more accurate the algorithm.
921   * However, don't set it too high. When considering larger numbers of
922   * nodes for each eviction, the evictor may delay the completion of a
923   * given database operation, which impacts the response time of the
924   * application thread. In JE 4.1 and later, setting this value too
925   * high in an application that is largely CPU bound can reduce the
926   * effectiveness of cache eviction. It's best to start with the
927   * default value, and increase it gradually to see if it is
928   * beneficial for your application.
929   *
930   * @return Returns the "db-evictor-nodes-per-scan" property definition.
931   */
932  public IntegerPropertyDefinition getDBEvictorNodesPerScanPropertyDefinition() {
933    return PD_DB_EVICTOR_NODES_PER_SCAN;
934  }
935
936
937
938  /**
939   * Get the "db-log-filecache-size" property definition.
940   * <p>
941   * Specifies the size of the file handle cache.
942   * <p>
943   * The file handle cache is used to keep as much opened log files as
944   * possible. When the cache is smaller than the number of logs, the
945   * database needs to close some handles and open log files it needs,
946   * resulting in less optimal performances. Ideally, the size of the
947   * cache should be higher than the number of files contained in the
948   * database. Make sure the OS number of open files per process is
949   * also tuned appropriately.
950   *
951   * @return Returns the "db-log-filecache-size" property definition.
952   */
953  public IntegerPropertyDefinition getDBLogFilecacheSizePropertyDefinition() {
954    return PD_DB_LOG_FILECACHE_SIZE;
955  }
956
957
958
959  /**
960   * Get the "db-log-file-max" property definition.
961   * <p>
962   * Specifies the maximum size for a database log file.
963   *
964   * @return Returns the "db-log-file-max" property definition.
965   */
966  public SizePropertyDefinition getDBLogFileMaxPropertyDefinition() {
967    return PD_DB_LOG_FILE_MAX;
968  }
969
970
971
972  /**
973   * Get the "db-logging-file-handler-on" property definition.
974   * <p>
975   * Indicates whether the database should maintain a je.info file in
976   * the same directory as the database log directory.
977   * <p>
978   * This file contains information about the internal processing
979   * performed by the underlying database.
980   *
981   * @return Returns the "db-logging-file-handler-on" property definition.
982   */
983  public BooleanPropertyDefinition getDBLoggingFileHandlerOnPropertyDefinition() {
984    return PD_DB_LOGGING_FILE_HANDLER_ON;
985  }
986
987
988
989  /**
990   * Get the "db-logging-level" property definition.
991   * <p>
992   * Specifies the log level that should be used by the database when
993   * it is writing information into the je.info file.
994   * <p>
995   * The database trace logging level is (in increasing order of
996   * verbosity) chosen from: OFF, SEVERE, WARNING, INFO, CONFIG, FINE,
997   * FINER, FINEST, ALL.
998   *
999   * @return Returns the "db-logging-level" property definition.
1000   */
1001  public StringPropertyDefinition getDBLoggingLevelPropertyDefinition() {
1002    return PD_DB_LOGGING_LEVEL;
1003  }
1004
1005
1006
1007  /**
1008   * Get the "db-num-cleaner-threads" property definition.
1009   * <p>
1010   * Specifies the number of threads that the backend should maintain
1011   * to keep the database log files at or near the desired utilization.
1012   * <p>
1013   * In environments with high write throughput, multiple cleaner
1014   * threads may be required to maintain the desired utilization.
1015   *
1016   * @return Returns the "db-num-cleaner-threads" property definition.
1017   */
1018  public IntegerPropertyDefinition getDBNumCleanerThreadsPropertyDefinition() {
1019    return PD_DB_NUM_CLEANER_THREADS;
1020  }
1021
1022
1023
1024  /**
1025   * Get the "db-num-lock-tables" property definition.
1026   * <p>
1027   * Specifies the number of lock tables that are used by the
1028   * underlying database.
1029   * <p>
1030   * This can be particularly important to help improve scalability by
1031   * avoiding contention on systems with large numbers of CPUs. The
1032   * value of this configuration property should be set to a prime
1033   * number that is less than or equal to the number of worker threads
1034   * configured for use in the server.
1035   *
1036   * @return Returns the "db-num-lock-tables" property definition.
1037   */
1038  public IntegerPropertyDefinition getDBNumLockTablesPropertyDefinition() {
1039    return PD_DB_NUM_LOCK_TABLES;
1040  }
1041
1042
1043
1044  /**
1045   * Get the "db-run-cleaner" property definition.
1046   * <p>
1047   * Indicates whether the cleaner threads should be enabled to
1048   * compact the database.
1049   * <p>
1050   * The cleaner threads are used to periodically compact the database
1051   * when it reaches a percentage of occupancy lower than the amount
1052   * specified by the db-cleaner-min-utilization property. They
1053   * identify database files with a low percentage of live data, and
1054   * relocate their remaining live data to the end of the log.
1055   *
1056   * @return Returns the "db-run-cleaner" property definition.
1057   */
1058  public BooleanPropertyDefinition getDBRunCleanerPropertyDefinition() {
1059    return PD_DB_RUN_CLEANER;
1060  }
1061
1062
1063
1064  /**
1065   * Get the "db-txn-no-sync" property definition.
1066   * <p>
1067   * Indicates whether database writes should be primarily written to
1068   * an internal buffer but not immediately written to disk.
1069   * <p>
1070   * Setting the value of this configuration attribute to "true" may
1071   * improve write performance but could cause the most recent changes
1072   * to be lost if the OpenDJ directory server or the underlying JVM
1073   * exits abnormally, or if an OS or hardware failure occurs (a
1074   * behavior similar to running with transaction durability disabled
1075   * in the Sun Java System Directory Server).
1076   *
1077   * @return Returns the "db-txn-no-sync" property definition.
1078   */
1079  public BooleanPropertyDefinition getDBTxnNoSyncPropertyDefinition() {
1080    return PD_DB_TXN_NO_SYNC;
1081  }
1082
1083
1084
1085  /**
1086   * Get the "db-txn-write-no-sync" property definition.
1087   * <p>
1088   * Indicates whether the database should synchronously flush data as
1089   * it is written to disk.
1090   * <p>
1091   * If this value is set to "false", then all data written to disk is
1092   * synchronously flushed to persistent storage and thereby providing
1093   * full durability. If it is set to "true", then data may be cached
1094   * for a period of time by the underlying operating system before
1095   * actually being written to disk. This may improve performance, but
1096   * could cause the most recent changes to be lost in the event of an
1097   * underlying OS or hardware failure (but not in the case that the
1098   * OpenDJ directory server or the JVM exits abnormally).
1099   *
1100   * @return Returns the "db-txn-write-no-sync" property definition.
1101   */
1102  public BooleanPropertyDefinition getDBTxnWriteNoSyncPropertyDefinition() {
1103    return PD_DB_TXN_WRITE_NO_SYNC;
1104  }
1105
1106
1107
1108  /**
1109   * Get the "disk-full-threshold" property definition.
1110   * <p>
1111   * Full disk threshold to limit database updates
1112   * <p>
1113   * When the available free space on the disk used by this database
1114   * instance falls below the value specified, no updates are permitted
1115   * and the server returns an UNWILLING_TO_PERFORM error. Updates are
1116   * allowed again as soon as free space rises above the threshold.
1117   *
1118   * @return Returns the "disk-full-threshold" property definition.
1119   */
1120  public SizePropertyDefinition getDiskFullThresholdPropertyDefinition() {
1121    return PD_DISK_FULL_THRESHOLD;
1122  }
1123
1124
1125
1126  /**
1127   * Get the "disk-low-threshold" property definition.
1128   * <p>
1129   * Low disk threshold to limit database updates
1130   * <p>
1131   * Specifies the "low" free space on the disk. When the available
1132   * free space on the disk used by this database instance falls below
1133   * the value specified, protocol updates on this database are
1134   * permitted only by a user with the BYPASS_LOCKDOWN privilege.
1135   *
1136   * @return Returns the "disk-low-threshold" property definition.
1137   */
1138  public SizePropertyDefinition getDiskLowThresholdPropertyDefinition() {
1139    return PD_DISK_LOW_THRESHOLD;
1140  }
1141
1142
1143
1144  /**
1145   * Get the "enabled" property definition.
1146   * <p>
1147   * Indicates whether the backend is enabled in the server.
1148   * <p>
1149   * If a backend is not enabled, then its contents are not accessible
1150   * when processing operations.
1151   *
1152   * @return Returns the "enabled" property definition.
1153   */
1154  public BooleanPropertyDefinition getEnabledPropertyDefinition() {
1155    return PluggableBackendCfgDefn.getInstance().getEnabledPropertyDefinition();
1156  }
1157
1158
1159
1160  /**
1161   * Get the "entries-compressed" property definition.
1162   * <p>
1163   * Indicates whether the backend should attempt to compress entries
1164   * before storing them in the database.
1165   * <p>
1166   * Note that this property applies only to the entries themselves
1167   * and does not impact the index data. Further, the effectiveness of
1168   * the compression is based on the type of data contained in the
1169   * entry.
1170   *
1171   * @return Returns the "entries-compressed" property definition.
1172   */
1173  public BooleanPropertyDefinition getEntriesCompressedPropertyDefinition() {
1174    return PluggableBackendCfgDefn.getInstance().getEntriesCompressedPropertyDefinition();
1175  }
1176
1177
1178
1179  /**
1180   * Get the "index-entry-limit" property definition.
1181   * <p>
1182   * Specifies the maximum number of entries that is allowed to match
1183   * a given index key before that particular index key is no longer
1184   * maintained.
1185   * <p>
1186   * This property is analogous to the ALL IDs threshold in the Sun
1187   * Java System Directory Server. Note that this is the default limit
1188   * for the backend, and it may be overridden on a per-attribute
1189   * basis.A value of 0 means there is no limit.
1190   *
1191   * @return Returns the "index-entry-limit" property definition.
1192   */
1193  public IntegerPropertyDefinition getIndexEntryLimitPropertyDefinition() {
1194    return PluggableBackendCfgDefn.getInstance().getIndexEntryLimitPropertyDefinition();
1195  }
1196
1197
1198
1199  /**
1200   * Get the "index-filter-analyzer-enabled" property definition.
1201   * <p>
1202   * Indicates whether to gather statistical information about the
1203   * search filters processed by the directory server while evaluating
1204   * the usage of indexes.
1205   * <p>
1206   * Analyzing indexes requires gathering search filter usage patterns
1207   * from user requests, especially for values as specified in the
1208   * filters and subsequently looking the status of those values into
1209   * the index files. When a search requests is processed, internal or
1210   * user generated, a first phase uses indexes to find potential
1211   * entries to be returned. Depending on the search filter, if the
1212   * index of one of the specified attributes matches too many entries
1213   * (exceeds the index entry limit), the search becomes non-indexed.
1214   * In any case, all entries thus gathered (or the entire DIT) are
1215   * matched against the filter for actually returning the search
1216   * result.
1217   *
1218   * @return Returns the "index-filter-analyzer-enabled" property definition.
1219   */
1220  public BooleanPropertyDefinition getIndexFilterAnalyzerEnabledPropertyDefinition() {
1221    return PluggableBackendCfgDefn.getInstance().getIndexFilterAnalyzerEnabledPropertyDefinition();
1222  }
1223
1224
1225
1226  /**
1227   * Get the "index-filter-analyzer-max-filters" property definition.
1228   * <p>
1229   * The maximum number of search filter statistics to keep.
1230   * <p>
1231   * When the maximum number of search filter is reached, the least
1232   * used one will be deleted.
1233   *
1234   * @return Returns the "index-filter-analyzer-max-filters" property definition.
1235   */
1236  public IntegerPropertyDefinition getIndexFilterAnalyzerMaxFiltersPropertyDefinition() {
1237    return PluggableBackendCfgDefn.getInstance().getIndexFilterAnalyzerMaxFiltersPropertyDefinition();
1238  }
1239
1240
1241
1242  /**
1243   * Get the "java-class" property definition.
1244   * <p>
1245   * Specifies the fully-qualified name of the Java class that
1246   * provides the backend implementation.
1247   *
1248   * @return Returns the "java-class" property definition.
1249   */
1250  public ClassPropertyDefinition getJavaClassPropertyDefinition() {
1251    return PD_JAVA_CLASS;
1252  }
1253
1254
1255
1256  /**
1257   * Get the "je-property" property definition.
1258   * <p>
1259   * Specifies the database and environment properties for the
1260   * Berkeley DB Java Edition database serving the data for this
1261   * backend.
1262   * <p>
1263   * Any Berkeley DB Java Edition property can be specified using the
1264   * following form: property-name=property-value. Refer to OpenDJ
1265   * documentation for further information on related properties, their
1266   * implications, and range values. The definitive identification of
1267   * all the property parameters is available in the example.properties
1268   * file of Berkeley DB Java Edition distribution.
1269   *
1270   * @return Returns the "je-property" property definition.
1271   */
1272  public StringPropertyDefinition getJEPropertyPropertyDefinition() {
1273    return PD_JE_PROPERTY;
1274  }
1275
1276
1277
1278  /**
1279   * Get the "preload-time-limit" property definition.
1280   * <p>
1281   * Specifies the length of time that the backend is allowed to spend
1282   * "pre-loading" data when it is initialized.
1283   * <p>
1284   * The pre-load process is used to pre-populate the database cache,
1285   * so that it can be more quickly available when the server is
1286   * processing requests. A duration of zero means there is no
1287   * pre-load.
1288   *
1289   * @return Returns the "preload-time-limit" property definition.
1290   */
1291  public DurationPropertyDefinition getPreloadTimeLimitPropertyDefinition() {
1292    return PluggableBackendCfgDefn.getInstance().getPreloadTimeLimitPropertyDefinition();
1293  }
1294
1295
1296
1297  /**
1298   * Get the "writability-mode" property definition.
1299   * <p>
1300   * Specifies the behavior that the backend should use when
1301   * processing write operations.
1302   *
1303   * @return Returns the "writability-mode" property definition.
1304   */
1305  public EnumPropertyDefinition<WritabilityMode> getWritabilityModePropertyDefinition() {
1306    return PluggableBackendCfgDefn.getInstance().getWritabilityModePropertyDefinition();
1307  }
1308
1309
1310
1311  /**
1312   * Get the "backend-indexes" relation definition.
1313   *
1314   * @return Returns the "backend-indexes" relation definition.
1315   */
1316  public InstantiableRelationDefinition<BackendIndexCfgClient,BackendIndexCfg> getBackendIndexesRelationDefinition() {
1317    return PluggableBackendCfgDefn.getInstance().getBackendIndexesRelationDefinition();
1318  }
1319
1320
1321
1322  /**
1323   * Get the "backend-vlv-indexes" relation definition.
1324   *
1325   * @return Returns the "backend-vlv-indexes" relation definition.
1326   */
1327  public InstantiableRelationDefinition<BackendVLVIndexCfgClient,BackendVLVIndexCfg> getBackendVLVIndexesRelationDefinition() {
1328    return PluggableBackendCfgDefn.getInstance().getBackendVLVIndexesRelationDefinition();
1329  }
1330
1331
1332
1333  /**
1334   * Managed object client implementation.
1335   */
1336  private static class JEBackendCfgClientImpl implements
1337    JEBackendCfgClient {
1338
1339    /** Private implementation. */
1340    private ManagedObject<? extends JEBackendCfgClient> impl;
1341
1342
1343
1344    /** Private constructor. */
1345    private JEBackendCfgClientImpl(
1346        ManagedObject<? extends JEBackendCfgClient> impl) {
1347      this.impl = impl;
1348    }
1349
1350
1351
1352    /** {@inheritDoc} */
1353    public String getBackendId() {
1354      return impl.getPropertyValue(INSTANCE.getBackendIdPropertyDefinition());
1355    }
1356
1357
1358
1359    /** {@inheritDoc} */
1360    public void setBackendId(String value) throws PropertyException {
1361      impl.setPropertyValue(INSTANCE.getBackendIdPropertyDefinition(), value);
1362    }
1363
1364
1365
1366    /** {@inheritDoc} */
1367    public SortedSet<DN> getBaseDN() {
1368      return impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition());
1369    }
1370
1371
1372
1373    /** {@inheritDoc} */
1374    public void setBaseDN(Collection<DN> values) {
1375      impl.setPropertyValues(INSTANCE.getBaseDNPropertyDefinition(), values);
1376    }
1377
1378
1379
1380    /** {@inheritDoc} */
1381    public boolean isCompactEncoding() {
1382      return impl.getPropertyValue(INSTANCE.getCompactEncodingPropertyDefinition());
1383    }
1384
1385
1386
1387    /** {@inheritDoc} */
1388    public void setCompactEncoding(Boolean value) {
1389      impl.setPropertyValue(INSTANCE.getCompactEncodingPropertyDefinition(), value);
1390    }
1391
1392
1393
1394    /** {@inheritDoc} */
1395    public int getDBCachePercent() {
1396      return impl.getPropertyValue(INSTANCE.getDBCachePercentPropertyDefinition());
1397    }
1398
1399
1400
1401    /** {@inheritDoc} */
1402    public void setDBCachePercent(Integer value) {
1403      impl.setPropertyValue(INSTANCE.getDBCachePercentPropertyDefinition(), value);
1404    }
1405
1406
1407
1408    /** {@inheritDoc} */
1409    public long getDBCacheSize() {
1410      return impl.getPropertyValue(INSTANCE.getDBCacheSizePropertyDefinition());
1411    }
1412
1413
1414
1415    /** {@inheritDoc} */
1416    public void setDBCacheSize(Long value) {
1417      impl.setPropertyValue(INSTANCE.getDBCacheSizePropertyDefinition(), value);
1418    }
1419
1420
1421
1422    /** {@inheritDoc} */
1423    public long getDBCheckpointerBytesInterval() {
1424      return impl.getPropertyValue(INSTANCE.getDBCheckpointerBytesIntervalPropertyDefinition());
1425    }
1426
1427
1428
1429    /** {@inheritDoc} */
1430    public void setDBCheckpointerBytesInterval(Long value) {
1431      impl.setPropertyValue(INSTANCE.getDBCheckpointerBytesIntervalPropertyDefinition(), value);
1432    }
1433
1434
1435
1436    /** {@inheritDoc} */
1437    public long getDBCheckpointerWakeupInterval() {
1438      return impl.getPropertyValue(INSTANCE.getDBCheckpointerWakeupIntervalPropertyDefinition());
1439    }
1440
1441
1442
1443    /** {@inheritDoc} */
1444    public void setDBCheckpointerWakeupInterval(Long value) {
1445      impl.setPropertyValue(INSTANCE.getDBCheckpointerWakeupIntervalPropertyDefinition(), value);
1446    }
1447
1448
1449
1450    /** {@inheritDoc} */
1451    public int getDBCleanerMinUtilization() {
1452      return impl.getPropertyValue(INSTANCE.getDBCleanerMinUtilizationPropertyDefinition());
1453    }
1454
1455
1456
1457    /** {@inheritDoc} */
1458    public void setDBCleanerMinUtilization(Integer value) {
1459      impl.setPropertyValue(INSTANCE.getDBCleanerMinUtilizationPropertyDefinition(), value);
1460    }
1461
1462
1463
1464    /** {@inheritDoc} */
1465    public String getDBDirectory() {
1466      return impl.getPropertyValue(INSTANCE.getDBDirectoryPropertyDefinition());
1467    }
1468
1469
1470
1471    /** {@inheritDoc} */
1472    public void setDBDirectory(String value) {
1473      impl.setPropertyValue(INSTANCE.getDBDirectoryPropertyDefinition(), value);
1474    }
1475
1476
1477
1478    /** {@inheritDoc} */
1479    public String getDBDirectoryPermissions() {
1480      return impl.getPropertyValue(INSTANCE.getDBDirectoryPermissionsPropertyDefinition());
1481    }
1482
1483
1484
1485    /** {@inheritDoc} */
1486    public void setDBDirectoryPermissions(String value) {
1487      impl.setPropertyValue(INSTANCE.getDBDirectoryPermissionsPropertyDefinition(), value);
1488    }
1489
1490
1491
1492    /** {@inheritDoc} */
1493    public int getDBEvictorCoreThreads() {
1494      return impl.getPropertyValue(INSTANCE.getDBEvictorCoreThreadsPropertyDefinition());
1495    }
1496
1497
1498
1499    /** {@inheritDoc} */
1500    public void setDBEvictorCoreThreads(Integer value) {
1501      impl.setPropertyValue(INSTANCE.getDBEvictorCoreThreadsPropertyDefinition(), value);
1502    }
1503
1504
1505
1506    /** {@inheritDoc} */
1507    public long getDBEvictorKeepAlive() {
1508      return impl.getPropertyValue(INSTANCE.getDBEvictorKeepAlivePropertyDefinition());
1509    }
1510
1511
1512
1513    /** {@inheritDoc} */
1514    public void setDBEvictorKeepAlive(Long value) {
1515      impl.setPropertyValue(INSTANCE.getDBEvictorKeepAlivePropertyDefinition(), value);
1516    }
1517
1518
1519
1520    /** {@inheritDoc} */
1521    public boolean isDBEvictorLruOnly() {
1522      return impl.getPropertyValue(INSTANCE.getDBEvictorLruOnlyPropertyDefinition());
1523    }
1524
1525
1526
1527    /** {@inheritDoc} */
1528    public void setDBEvictorLruOnly(Boolean value) {
1529      impl.setPropertyValue(INSTANCE.getDBEvictorLruOnlyPropertyDefinition(), value);
1530    }
1531
1532
1533
1534    /** {@inheritDoc} */
1535    public int getDBEvictorMaxThreads() {
1536      return impl.getPropertyValue(INSTANCE.getDBEvictorMaxThreadsPropertyDefinition());
1537    }
1538
1539
1540
1541    /** {@inheritDoc} */
1542    public void setDBEvictorMaxThreads(Integer value) {
1543      impl.setPropertyValue(INSTANCE.getDBEvictorMaxThreadsPropertyDefinition(), value);
1544    }
1545
1546
1547
1548    /** {@inheritDoc} */
1549    public int getDBEvictorNodesPerScan() {
1550      return impl.getPropertyValue(INSTANCE.getDBEvictorNodesPerScanPropertyDefinition());
1551    }
1552
1553
1554
1555    /** {@inheritDoc} */
1556    public void setDBEvictorNodesPerScan(Integer value) {
1557      impl.setPropertyValue(INSTANCE.getDBEvictorNodesPerScanPropertyDefinition(), value);
1558    }
1559
1560
1561
1562    /** {@inheritDoc} */
1563    public int getDBLogFilecacheSize() {
1564      return impl.getPropertyValue(INSTANCE.getDBLogFilecacheSizePropertyDefinition());
1565    }
1566
1567
1568
1569    /** {@inheritDoc} */
1570    public void setDBLogFilecacheSize(Integer value) {
1571      impl.setPropertyValue(INSTANCE.getDBLogFilecacheSizePropertyDefinition(), value);
1572    }
1573
1574
1575
1576    /** {@inheritDoc} */
1577    public long getDBLogFileMax() {
1578      return impl.getPropertyValue(INSTANCE.getDBLogFileMaxPropertyDefinition());
1579    }
1580
1581
1582
1583    /** {@inheritDoc} */
1584    public void setDBLogFileMax(Long value) {
1585      impl.setPropertyValue(INSTANCE.getDBLogFileMaxPropertyDefinition(), value);
1586    }
1587
1588
1589
1590    /** {@inheritDoc} */
1591    public boolean isDBLoggingFileHandlerOn() {
1592      return impl.getPropertyValue(INSTANCE.getDBLoggingFileHandlerOnPropertyDefinition());
1593    }
1594
1595
1596
1597    /** {@inheritDoc} */
1598    public void setDBLoggingFileHandlerOn(Boolean value) {
1599      impl.setPropertyValue(INSTANCE.getDBLoggingFileHandlerOnPropertyDefinition(), value);
1600    }
1601
1602
1603
1604    /** {@inheritDoc} */
1605    public String getDBLoggingLevel() {
1606      return impl.getPropertyValue(INSTANCE.getDBLoggingLevelPropertyDefinition());
1607    }
1608
1609
1610
1611    /** {@inheritDoc} */
1612    public void setDBLoggingLevel(String value) {
1613      impl.setPropertyValue(INSTANCE.getDBLoggingLevelPropertyDefinition(), value);
1614    }
1615
1616
1617
1618    /** {@inheritDoc} */
1619    public Integer getDBNumCleanerThreads() {
1620      return impl.getPropertyValue(INSTANCE.getDBNumCleanerThreadsPropertyDefinition());
1621    }
1622
1623
1624
1625    /** {@inheritDoc} */
1626    public void setDBNumCleanerThreads(Integer value) {
1627      impl.setPropertyValue(INSTANCE.getDBNumCleanerThreadsPropertyDefinition(), value);
1628    }
1629
1630
1631
1632    /** {@inheritDoc} */
1633    public Integer getDBNumLockTables() {
1634      return impl.getPropertyValue(INSTANCE.getDBNumLockTablesPropertyDefinition());
1635    }
1636
1637
1638
1639    /** {@inheritDoc} */
1640    public void setDBNumLockTables(Integer value) {
1641      impl.setPropertyValue(INSTANCE.getDBNumLockTablesPropertyDefinition(), value);
1642    }
1643
1644
1645
1646    /** {@inheritDoc} */
1647    public boolean isDBRunCleaner() {
1648      return impl.getPropertyValue(INSTANCE.getDBRunCleanerPropertyDefinition());
1649    }
1650
1651
1652
1653    /** {@inheritDoc} */
1654    public void setDBRunCleaner(Boolean value) {
1655      impl.setPropertyValue(INSTANCE.getDBRunCleanerPropertyDefinition(), value);
1656    }
1657
1658
1659
1660    /** {@inheritDoc} */
1661    public boolean isDBTxnNoSync() {
1662      return impl.getPropertyValue(INSTANCE.getDBTxnNoSyncPropertyDefinition());
1663    }
1664
1665
1666
1667    /** {@inheritDoc} */
1668    public void setDBTxnNoSync(Boolean value) {
1669      impl.setPropertyValue(INSTANCE.getDBTxnNoSyncPropertyDefinition(), value);
1670    }
1671
1672
1673
1674    /** {@inheritDoc} */
1675    public boolean isDBTxnWriteNoSync() {
1676      return impl.getPropertyValue(INSTANCE.getDBTxnWriteNoSyncPropertyDefinition());
1677    }
1678
1679
1680
1681    /** {@inheritDoc} */
1682    public void setDBTxnWriteNoSync(Boolean value) {
1683      impl.setPropertyValue(INSTANCE.getDBTxnWriteNoSyncPropertyDefinition(), value);
1684    }
1685
1686
1687
1688    /** {@inheritDoc} */
1689    public long getDiskFullThreshold() {
1690      return impl.getPropertyValue(INSTANCE.getDiskFullThresholdPropertyDefinition());
1691    }
1692
1693
1694
1695    /** {@inheritDoc} */
1696    public void setDiskFullThreshold(Long value) {
1697      impl.setPropertyValue(INSTANCE.getDiskFullThresholdPropertyDefinition(), value);
1698    }
1699
1700
1701
1702    /** {@inheritDoc} */
1703    public long getDiskLowThreshold() {
1704      return impl.getPropertyValue(INSTANCE.getDiskLowThresholdPropertyDefinition());
1705    }
1706
1707
1708
1709    /** {@inheritDoc} */
1710    public void setDiskLowThreshold(Long value) {
1711      impl.setPropertyValue(INSTANCE.getDiskLowThresholdPropertyDefinition(), value);
1712    }
1713
1714
1715
1716    /** {@inheritDoc} */
1717    public Boolean isEnabled() {
1718      return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
1719    }
1720
1721
1722
1723    /** {@inheritDoc} */
1724    public void setEnabled(boolean value) {
1725      impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value);
1726    }
1727
1728
1729
1730    /** {@inheritDoc} */
1731    public boolean isEntriesCompressed() {
1732      return impl.getPropertyValue(INSTANCE.getEntriesCompressedPropertyDefinition());
1733    }
1734
1735
1736
1737    /** {@inheritDoc} */
1738    public void setEntriesCompressed(Boolean value) {
1739      impl.setPropertyValue(INSTANCE.getEntriesCompressedPropertyDefinition(), value);
1740    }
1741
1742
1743
1744    /** {@inheritDoc} */
1745    public int getIndexEntryLimit() {
1746      return impl.getPropertyValue(INSTANCE.getIndexEntryLimitPropertyDefinition());
1747    }
1748
1749
1750
1751    /** {@inheritDoc} */
1752    public void setIndexEntryLimit(Integer value) {
1753      impl.setPropertyValue(INSTANCE.getIndexEntryLimitPropertyDefinition(), value);
1754    }
1755
1756
1757
1758    /** {@inheritDoc} */
1759    public boolean isIndexFilterAnalyzerEnabled() {
1760      return impl.getPropertyValue(INSTANCE.getIndexFilterAnalyzerEnabledPropertyDefinition());
1761    }
1762
1763
1764
1765    /** {@inheritDoc} */
1766    public void setIndexFilterAnalyzerEnabled(Boolean value) {
1767      impl.setPropertyValue(INSTANCE.getIndexFilterAnalyzerEnabledPropertyDefinition(), value);
1768    }
1769
1770
1771
1772    /** {@inheritDoc} */
1773    public int getIndexFilterAnalyzerMaxFilters() {
1774      return impl.getPropertyValue(INSTANCE.getIndexFilterAnalyzerMaxFiltersPropertyDefinition());
1775    }
1776
1777
1778
1779    /** {@inheritDoc} */
1780    public void setIndexFilterAnalyzerMaxFilters(Integer value) {
1781      impl.setPropertyValue(INSTANCE.getIndexFilterAnalyzerMaxFiltersPropertyDefinition(), value);
1782    }
1783
1784
1785
1786    /** {@inheritDoc} */
1787    public String getJavaClass() {
1788      return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
1789    }
1790
1791
1792
1793    /** {@inheritDoc} */
1794    public void setJavaClass(String value) {
1795      impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value);
1796    }
1797
1798
1799
1800    /** {@inheritDoc} */
1801    public SortedSet<String> getJEProperty() {
1802      return impl.getPropertyValues(INSTANCE.getJEPropertyPropertyDefinition());
1803    }
1804
1805
1806
1807    /** {@inheritDoc} */
1808    public void setJEProperty(Collection<String> values) {
1809      impl.setPropertyValues(INSTANCE.getJEPropertyPropertyDefinition(), values);
1810    }
1811
1812
1813
1814    /** {@inheritDoc} */
1815    public long getPreloadTimeLimit() {
1816      return impl.getPropertyValue(INSTANCE.getPreloadTimeLimitPropertyDefinition());
1817    }
1818
1819
1820
1821    /** {@inheritDoc} */
1822    public void setPreloadTimeLimit(Long value) {
1823      impl.setPropertyValue(INSTANCE.getPreloadTimeLimitPropertyDefinition(), value);
1824    }
1825
1826
1827
1828    /** {@inheritDoc} */
1829    public WritabilityMode getWritabilityMode() {
1830      return impl.getPropertyValue(INSTANCE.getWritabilityModePropertyDefinition());
1831    }
1832
1833
1834
1835    /** {@inheritDoc} */
1836    public void setWritabilityMode(WritabilityMode value) {
1837      impl.setPropertyValue(INSTANCE.getWritabilityModePropertyDefinition(), value);
1838    }
1839
1840
1841
1842    /** {@inheritDoc} */
1843    public String[] listBackendIndexes() throws ConcurrentModificationException,
1844        LdapException {
1845      return impl.listChildren(INSTANCE.getBackendIndexesRelationDefinition());
1846    }
1847
1848
1849
1850    /** {@inheritDoc} */
1851    public BackendIndexCfgClient getBackendIndex(String name)
1852        throws DefinitionDecodingException, ManagedObjectDecodingException,
1853        ManagedObjectNotFoundException, ConcurrentModificationException,
1854        LdapException {
1855      return impl.getChild(INSTANCE.getBackendIndexesRelationDefinition(), name).getConfiguration();
1856    }
1857
1858
1859
1860    /** {@inheritDoc} */
1861    public <M extends BackendIndexCfgClient> M createBackendIndex(
1862        ManagedObjectDefinition<M, ? extends BackendIndexCfg> d, String name, Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException {
1863      return impl.createChild(INSTANCE.getBackendIndexesRelationDefinition(), d, name, exceptions).getConfiguration();
1864    }
1865
1866
1867
1868    /** {@inheritDoc} */
1869    public void removeBackendIndex(String name)
1870        throws ManagedObjectNotFoundException, ConcurrentModificationException,
1871        OperationRejectedException, LdapException {
1872      impl.removeChild(INSTANCE.getBackendIndexesRelationDefinition(), name);
1873    }
1874
1875
1876
1877    /** {@inheritDoc} */
1878    public String[] listBackendVLVIndexes() throws ConcurrentModificationException,
1879        LdapException {
1880      return impl.listChildren(INSTANCE.getBackendVLVIndexesRelationDefinition());
1881    }
1882
1883
1884
1885    /** {@inheritDoc} */
1886    public BackendVLVIndexCfgClient getBackendVLVIndex(String name)
1887        throws DefinitionDecodingException, ManagedObjectDecodingException,
1888        ManagedObjectNotFoundException, ConcurrentModificationException,
1889        LdapException {
1890      return impl.getChild(INSTANCE.getBackendVLVIndexesRelationDefinition(), name).getConfiguration();
1891    }
1892
1893
1894
1895    /** {@inheritDoc} */
1896    public <M extends BackendVLVIndexCfgClient> M createBackendVLVIndex(
1897        ManagedObjectDefinition<M, ? extends BackendVLVIndexCfg> d, String name, Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException {
1898      return impl.createChild(INSTANCE.getBackendVLVIndexesRelationDefinition(), d, name, exceptions).getConfiguration();
1899    }
1900
1901
1902
1903    /** {@inheritDoc} */
1904    public void removeBackendVLVIndex(String name)
1905        throws ManagedObjectNotFoundException, ConcurrentModificationException,
1906        OperationRejectedException, LdapException {
1907      impl.removeChild(INSTANCE.getBackendVLVIndexesRelationDefinition(), name);
1908    }
1909
1910
1911
1912    /** {@inheritDoc} */
1913    public ManagedObjectDefinition<? extends JEBackendCfgClient, ? extends JEBackendCfg> definition() {
1914      return INSTANCE;
1915    }
1916
1917
1918
1919    /** {@inheritDoc} */
1920    public PropertyProvider properties() {
1921      return impl;
1922    }
1923
1924
1925
1926    /** {@inheritDoc} */
1927    public void commit() throws ManagedObjectAlreadyExistsException,
1928        MissingMandatoryPropertiesException, ConcurrentModificationException,
1929        OperationRejectedException, LdapException {
1930      impl.commit();
1931    }
1932
1933
1934
1935    /** {@inheritDoc} */
1936    public String toString() {
1937      return impl.toString();
1938    }
1939  }
1940
1941
1942
1943  /**
1944   * Managed object server implementation.
1945   */
1946  private static class JEBackendCfgServerImpl implements
1947    JEBackendCfg {
1948
1949    /** Private implementation. */
1950    private ServerManagedObject<? extends JEBackendCfg> impl;
1951
1952    /** The value of the "backend-id" property. */
1953    private final String pBackendId;
1954
1955    /** The value of the "base-dn" property. */
1956    private final SortedSet<DN> pBaseDN;
1957
1958    /** The value of the "compact-encoding" property. */
1959    private final boolean pCompactEncoding;
1960
1961    /** The value of the "db-cache-percent" property. */
1962    private final int pDBCachePercent;
1963
1964    /** The value of the "db-cache-size" property. */
1965    private final long pDBCacheSize;
1966
1967    /** The value of the "db-checkpointer-bytes-interval" property. */
1968    private final long pDBCheckpointerBytesInterval;
1969
1970    /** The value of the "db-checkpointer-wakeup-interval" property. */
1971    private final long pDBCheckpointerWakeupInterval;
1972
1973    /** The value of the "db-cleaner-min-utilization" property. */
1974    private final int pDBCleanerMinUtilization;
1975
1976    /** The value of the "db-directory" property. */
1977    private final String pDBDirectory;
1978
1979    /** The value of the "db-directory-permissions" property. */
1980    private final String pDBDirectoryPermissions;
1981
1982    /** The value of the "db-evictor-core-threads" property. */
1983    private final int pDBEvictorCoreThreads;
1984
1985    /** The value of the "db-evictor-keep-alive" property. */
1986    private final long pDBEvictorKeepAlive;
1987
1988    /** The value of the "db-evictor-lru-only" property. */
1989    private final boolean pDBEvictorLruOnly;
1990
1991    /** The value of the "db-evictor-max-threads" property. */
1992    private final int pDBEvictorMaxThreads;
1993
1994    /** The value of the "db-evictor-nodes-per-scan" property. */
1995    private final int pDBEvictorNodesPerScan;
1996
1997    /** The value of the "db-log-filecache-size" property. */
1998    private final int pDBLogFilecacheSize;
1999
2000    /** The value of the "db-log-file-max" property. */
2001    private final long pDBLogFileMax;
2002
2003    /** The value of the "db-logging-file-handler-on" property. */
2004    private final boolean pDBLoggingFileHandlerOn;
2005
2006    /** The value of the "db-logging-level" property. */
2007    private final String pDBLoggingLevel;
2008
2009    /** The value of the "db-num-cleaner-threads" property. */
2010    private final Integer pDBNumCleanerThreads;
2011
2012    /** The value of the "db-num-lock-tables" property. */
2013    private final Integer pDBNumLockTables;
2014
2015    /** The value of the "db-run-cleaner" property. */
2016    private final boolean pDBRunCleaner;
2017
2018    /** The value of the "db-txn-no-sync" property. */
2019    private final boolean pDBTxnNoSync;
2020
2021    /** The value of the "db-txn-write-no-sync" property. */
2022    private final boolean pDBTxnWriteNoSync;
2023
2024    /** The value of the "disk-full-threshold" property. */
2025    private final long pDiskFullThreshold;
2026
2027    /** The value of the "disk-low-threshold" property. */
2028    private final long pDiskLowThreshold;
2029
2030    /** The value of the "enabled" property. */
2031    private final boolean pEnabled;
2032
2033    /** The value of the "entries-compressed" property. */
2034    private final boolean pEntriesCompressed;
2035
2036    /** The value of the "index-entry-limit" property. */
2037    private final int pIndexEntryLimit;
2038
2039    /** The value of the "index-filter-analyzer-enabled" property. */
2040    private final boolean pIndexFilterAnalyzerEnabled;
2041
2042    /** The value of the "index-filter-analyzer-max-filters" property. */
2043    private final int pIndexFilterAnalyzerMaxFilters;
2044
2045    /** The value of the "java-class" property. */
2046    private final String pJavaClass;
2047
2048    /** The value of the "je-property" property. */
2049    private final SortedSet<String> pJEProperty;
2050
2051    /** The value of the "preload-time-limit" property. */
2052    private final long pPreloadTimeLimit;
2053
2054    /** The value of the "writability-mode" property. */
2055    private final WritabilityMode pWritabilityMode;
2056
2057
2058
2059    /** Private constructor. */
2060    private JEBackendCfgServerImpl(ServerManagedObject<? extends JEBackendCfg> impl) {
2061      this.impl = impl;
2062      this.pBackendId = impl.getPropertyValue(INSTANCE.getBackendIdPropertyDefinition());
2063      this.pBaseDN = impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition());
2064      this.pCompactEncoding = impl.getPropertyValue(INSTANCE.getCompactEncodingPropertyDefinition());
2065      this.pDBCachePercent = impl.getPropertyValue(INSTANCE.getDBCachePercentPropertyDefinition());
2066      this.pDBCacheSize = impl.getPropertyValue(INSTANCE.getDBCacheSizePropertyDefinition());
2067      this.pDBCheckpointerBytesInterval = impl.getPropertyValue(INSTANCE.getDBCheckpointerBytesIntervalPropertyDefinition());
2068      this.pDBCheckpointerWakeupInterval = impl.getPropertyValue(INSTANCE.getDBCheckpointerWakeupIntervalPropertyDefinition());
2069      this.pDBCleanerMinUtilization = impl.getPropertyValue(INSTANCE.getDBCleanerMinUtilizationPropertyDefinition());
2070      this.pDBDirectory = impl.getPropertyValue(INSTANCE.getDBDirectoryPropertyDefinition());
2071      this.pDBDirectoryPermissions = impl.getPropertyValue(INSTANCE.getDBDirectoryPermissionsPropertyDefinition());
2072      this.pDBEvictorCoreThreads = impl.getPropertyValue(INSTANCE.getDBEvictorCoreThreadsPropertyDefinition());
2073      this.pDBEvictorKeepAlive = impl.getPropertyValue(INSTANCE.getDBEvictorKeepAlivePropertyDefinition());
2074      this.pDBEvictorLruOnly = impl.getPropertyValue(INSTANCE.getDBEvictorLruOnlyPropertyDefinition());
2075      this.pDBEvictorMaxThreads = impl.getPropertyValue(INSTANCE.getDBEvictorMaxThreadsPropertyDefinition());
2076      this.pDBEvictorNodesPerScan = impl.getPropertyValue(INSTANCE.getDBEvictorNodesPerScanPropertyDefinition());
2077      this.pDBLogFilecacheSize = impl.getPropertyValue(INSTANCE.getDBLogFilecacheSizePropertyDefinition());
2078      this.pDBLogFileMax = impl.getPropertyValue(INSTANCE.getDBLogFileMaxPropertyDefinition());
2079      this.pDBLoggingFileHandlerOn = impl.getPropertyValue(INSTANCE.getDBLoggingFileHandlerOnPropertyDefinition());
2080      this.pDBLoggingLevel = impl.getPropertyValue(INSTANCE.getDBLoggingLevelPropertyDefinition());
2081      this.pDBNumCleanerThreads = impl.getPropertyValue(INSTANCE.getDBNumCleanerThreadsPropertyDefinition());
2082      this.pDBNumLockTables = impl.getPropertyValue(INSTANCE.getDBNumLockTablesPropertyDefinition());
2083      this.pDBRunCleaner = impl.getPropertyValue(INSTANCE.getDBRunCleanerPropertyDefinition());
2084      this.pDBTxnNoSync = impl.getPropertyValue(INSTANCE.getDBTxnNoSyncPropertyDefinition());
2085      this.pDBTxnWriteNoSync = impl.getPropertyValue(INSTANCE.getDBTxnWriteNoSyncPropertyDefinition());
2086      this.pDiskFullThreshold = impl.getPropertyValue(INSTANCE.getDiskFullThresholdPropertyDefinition());
2087      this.pDiskLowThreshold = impl.getPropertyValue(INSTANCE.getDiskLowThresholdPropertyDefinition());
2088      this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
2089      this.pEntriesCompressed = impl.getPropertyValue(INSTANCE.getEntriesCompressedPropertyDefinition());
2090      this.pIndexEntryLimit = impl.getPropertyValue(INSTANCE.getIndexEntryLimitPropertyDefinition());
2091      this.pIndexFilterAnalyzerEnabled = impl.getPropertyValue(INSTANCE.getIndexFilterAnalyzerEnabledPropertyDefinition());
2092      this.pIndexFilterAnalyzerMaxFilters = impl.getPropertyValue(INSTANCE.getIndexFilterAnalyzerMaxFiltersPropertyDefinition());
2093      this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
2094      this.pJEProperty = impl.getPropertyValues(INSTANCE.getJEPropertyPropertyDefinition());
2095      this.pPreloadTimeLimit = impl.getPropertyValue(INSTANCE.getPreloadTimeLimitPropertyDefinition());
2096      this.pWritabilityMode = impl.getPropertyValue(INSTANCE.getWritabilityModePropertyDefinition());
2097    }
2098
2099
2100
2101    /** {@inheritDoc} */
2102    public void addJEChangeListener(
2103        ConfigurationChangeListener<JEBackendCfg> listener) {
2104      impl.registerChangeListener(listener);
2105    }
2106
2107
2108
2109    /** {@inheritDoc} */
2110    public void removeJEChangeListener(
2111        ConfigurationChangeListener<JEBackendCfg> listener) {
2112      impl.deregisterChangeListener(listener);
2113    }
2114    /** {@inheritDoc} */
2115    public void addPluggableChangeListener(
2116        ConfigurationChangeListener<PluggableBackendCfg> listener) {
2117      impl.registerChangeListener(listener);
2118    }
2119
2120
2121
2122    /** {@inheritDoc} */
2123    public void removePluggableChangeListener(
2124        ConfigurationChangeListener<PluggableBackendCfg> listener) {
2125      impl.deregisterChangeListener(listener);
2126    }
2127    /** {@inheritDoc} */
2128    public void addChangeListener(
2129        ConfigurationChangeListener<BackendCfg> listener) {
2130      impl.registerChangeListener(listener);
2131    }
2132
2133
2134
2135    /** {@inheritDoc} */
2136    public void removeChangeListener(
2137        ConfigurationChangeListener<BackendCfg> listener) {
2138      impl.deregisterChangeListener(listener);
2139    }
2140
2141
2142
2143    /** {@inheritDoc} */
2144    public String getBackendId() {
2145      return pBackendId;
2146    }
2147
2148
2149
2150    /** {@inheritDoc} */
2151    public SortedSet<DN> getBaseDN() {
2152      return pBaseDN;
2153    }
2154
2155
2156
2157    /** {@inheritDoc} */
2158    public boolean isCompactEncoding() {
2159      return pCompactEncoding;
2160    }
2161
2162
2163
2164    /** {@inheritDoc} */
2165    public int getDBCachePercent() {
2166      return pDBCachePercent;
2167    }
2168
2169
2170
2171    /** {@inheritDoc} */
2172    public long getDBCacheSize() {
2173      return pDBCacheSize;
2174    }
2175
2176
2177
2178    /** {@inheritDoc} */
2179    public long getDBCheckpointerBytesInterval() {
2180      return pDBCheckpointerBytesInterval;
2181    }
2182
2183
2184
2185    /** {@inheritDoc} */
2186    public long getDBCheckpointerWakeupInterval() {
2187      return pDBCheckpointerWakeupInterval;
2188    }
2189
2190
2191
2192    /** {@inheritDoc} */
2193    public int getDBCleanerMinUtilization() {
2194      return pDBCleanerMinUtilization;
2195    }
2196
2197
2198
2199    /** {@inheritDoc} */
2200    public String getDBDirectory() {
2201      return pDBDirectory;
2202    }
2203
2204
2205
2206    /** {@inheritDoc} */
2207    public String getDBDirectoryPermissions() {
2208      return pDBDirectoryPermissions;
2209    }
2210
2211
2212
2213    /** {@inheritDoc} */
2214    public int getDBEvictorCoreThreads() {
2215      return pDBEvictorCoreThreads;
2216    }
2217
2218
2219
2220    /** {@inheritDoc} */
2221    public long getDBEvictorKeepAlive() {
2222      return pDBEvictorKeepAlive;
2223    }
2224
2225
2226
2227    /** {@inheritDoc} */
2228    public boolean isDBEvictorLruOnly() {
2229      return pDBEvictorLruOnly;
2230    }
2231
2232
2233
2234    /** {@inheritDoc} */
2235    public int getDBEvictorMaxThreads() {
2236      return pDBEvictorMaxThreads;
2237    }
2238
2239
2240
2241    /** {@inheritDoc} */
2242    public int getDBEvictorNodesPerScan() {
2243      return pDBEvictorNodesPerScan;
2244    }
2245
2246
2247
2248    /** {@inheritDoc} */
2249    public int getDBLogFilecacheSize() {
2250      return pDBLogFilecacheSize;
2251    }
2252
2253
2254
2255    /** {@inheritDoc} */
2256    public long getDBLogFileMax() {
2257      return pDBLogFileMax;
2258    }
2259
2260
2261
2262    /** {@inheritDoc} */
2263    public boolean isDBLoggingFileHandlerOn() {
2264      return pDBLoggingFileHandlerOn;
2265    }
2266
2267
2268
2269    /** {@inheritDoc} */
2270    public String getDBLoggingLevel() {
2271      return pDBLoggingLevel;
2272    }
2273
2274
2275
2276    /** {@inheritDoc} */
2277    public Integer getDBNumCleanerThreads() {
2278      return pDBNumCleanerThreads;
2279    }
2280
2281
2282
2283    /** {@inheritDoc} */
2284    public Integer getDBNumLockTables() {
2285      return pDBNumLockTables;
2286    }
2287
2288
2289
2290    /** {@inheritDoc} */
2291    public boolean isDBRunCleaner() {
2292      return pDBRunCleaner;
2293    }
2294
2295
2296
2297    /** {@inheritDoc} */
2298    public boolean isDBTxnNoSync() {
2299      return pDBTxnNoSync;
2300    }
2301
2302
2303
2304    /** {@inheritDoc} */
2305    public boolean isDBTxnWriteNoSync() {
2306      return pDBTxnWriteNoSync;
2307    }
2308
2309
2310
2311    /** {@inheritDoc} */
2312    public long getDiskFullThreshold() {
2313      return pDiskFullThreshold;
2314    }
2315
2316
2317
2318    /** {@inheritDoc} */
2319    public long getDiskLowThreshold() {
2320      return pDiskLowThreshold;
2321    }
2322
2323
2324
2325    /** {@inheritDoc} */
2326    public boolean isEnabled() {
2327      return pEnabled;
2328    }
2329
2330
2331
2332    /** {@inheritDoc} */
2333    public boolean isEntriesCompressed() {
2334      return pEntriesCompressed;
2335    }
2336
2337
2338
2339    /** {@inheritDoc} */
2340    public int getIndexEntryLimit() {
2341      return pIndexEntryLimit;
2342    }
2343
2344
2345
2346    /** {@inheritDoc} */
2347    public boolean isIndexFilterAnalyzerEnabled() {
2348      return pIndexFilterAnalyzerEnabled;
2349    }
2350
2351
2352
2353    /** {@inheritDoc} */
2354    public int getIndexFilterAnalyzerMaxFilters() {
2355      return pIndexFilterAnalyzerMaxFilters;
2356    }
2357
2358
2359
2360    /** {@inheritDoc} */
2361    public String getJavaClass() {
2362      return pJavaClass;
2363    }
2364
2365
2366
2367    /** {@inheritDoc} */
2368    public SortedSet<String> getJEProperty() {
2369      return pJEProperty;
2370    }
2371
2372
2373
2374    /** {@inheritDoc} */
2375    public long getPreloadTimeLimit() {
2376      return pPreloadTimeLimit;
2377    }
2378
2379
2380
2381    /** {@inheritDoc} */
2382    public WritabilityMode getWritabilityMode() {
2383      return pWritabilityMode;
2384    }
2385
2386
2387
2388    /** {@inheritDoc} */
2389    public String[] listBackendIndexes() {
2390      return impl.listChildren(INSTANCE.getBackendIndexesRelationDefinition());
2391    }
2392
2393
2394
2395    /** {@inheritDoc} */
2396    public BackendIndexCfg getBackendIndex(String name) throws ConfigException {
2397      return impl.getChild(INSTANCE.getBackendIndexesRelationDefinition(), name).getConfiguration();
2398    }
2399
2400
2401
2402    /** {@inheritDoc} */
2403    public void addBackendIndexAddListener(
2404        ConfigurationAddListener<BackendIndexCfg> listener) throws ConfigException {
2405      impl.registerAddListener(INSTANCE.getBackendIndexesRelationDefinition(), listener);
2406    }
2407
2408
2409
2410    /** {@inheritDoc} */
2411    public void removeBackendIndexAddListener(
2412        ConfigurationAddListener<BackendIndexCfg> listener) {
2413      impl.deregisterAddListener(INSTANCE.getBackendIndexesRelationDefinition(), listener);
2414    }
2415
2416
2417
2418    /** {@inheritDoc} */
2419    public void addBackendIndexDeleteListener(
2420        ConfigurationDeleteListener<BackendIndexCfg> listener) throws ConfigException {
2421      impl.registerDeleteListener(INSTANCE.getBackendIndexesRelationDefinition(), listener);
2422    }
2423
2424
2425
2426    /** {@inheritDoc} */
2427    public void removeBackendIndexDeleteListener(
2428        ConfigurationDeleteListener<BackendIndexCfg> listener) {
2429      impl.deregisterDeleteListener(INSTANCE.getBackendIndexesRelationDefinition(), listener);
2430    }
2431
2432
2433
2434    /** {@inheritDoc} */
2435    public String[] listBackendVLVIndexes() {
2436      return impl.listChildren(INSTANCE.getBackendVLVIndexesRelationDefinition());
2437    }
2438
2439
2440
2441    /** {@inheritDoc} */
2442    public BackendVLVIndexCfg getBackendVLVIndex(String name) throws ConfigException {
2443      return impl.getChild(INSTANCE.getBackendVLVIndexesRelationDefinition(), name).getConfiguration();
2444    }
2445
2446
2447
2448    /** {@inheritDoc} */
2449    public void addBackendVLVIndexAddListener(
2450        ConfigurationAddListener<BackendVLVIndexCfg> listener) throws ConfigException {
2451      impl.registerAddListener(INSTANCE.getBackendVLVIndexesRelationDefinition(), listener);
2452    }
2453
2454
2455
2456    /** {@inheritDoc} */
2457    public void removeBackendVLVIndexAddListener(
2458        ConfigurationAddListener<BackendVLVIndexCfg> listener) {
2459      impl.deregisterAddListener(INSTANCE.getBackendVLVIndexesRelationDefinition(), listener);
2460    }
2461
2462
2463
2464    /** {@inheritDoc} */
2465    public void addBackendVLVIndexDeleteListener(
2466        ConfigurationDeleteListener<BackendVLVIndexCfg> listener) throws ConfigException {
2467      impl.registerDeleteListener(INSTANCE.getBackendVLVIndexesRelationDefinition(), listener);
2468    }
2469
2470
2471
2472    /** {@inheritDoc} */
2473    public void removeBackendVLVIndexDeleteListener(
2474        ConfigurationDeleteListener<BackendVLVIndexCfg> listener) {
2475      impl.deregisterDeleteListener(INSTANCE.getBackendVLVIndexesRelationDefinition(), listener);
2476    }
2477
2478
2479
2480    /** {@inheritDoc} */
2481    public Class<? extends JEBackendCfg> configurationClass() {
2482      return JEBackendCfg.class;
2483    }
2484
2485
2486
2487    /** {@inheritDoc} */
2488    public DN dn() {
2489      return impl.getDN();
2490    }
2491
2492
2493
2494    /** {@inheritDoc} */
2495    public String toString() {
2496      return impl.toString();
2497    }
2498  }
2499}