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