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