001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016package org.forgerock.opendj.server.config.meta;
017
018
019
020import java.util.Collection;
021import java.util.SortedSet;
022import org.forgerock.opendj.config.AdministratorAction;
023import org.forgerock.opendj.config.BooleanPropertyDefinition;
024import org.forgerock.opendj.config.ClassPropertyDefinition;
025import org.forgerock.opendj.config.client.ConcurrentModificationException;
026import org.forgerock.opendj.config.client.IllegalManagedObjectNameException;
027import org.forgerock.opendj.config.client.ManagedObject;
028import org.forgerock.opendj.config.client.ManagedObjectDecodingException;
029import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException;
030import org.forgerock.opendj.config.client.OperationRejectedException;
031import org.forgerock.opendj.config.DefaultBehaviorProvider;
032import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
033import org.forgerock.opendj.config.DefinitionDecodingException;
034import org.forgerock.opendj.config.DNPropertyDefinition;
035import org.forgerock.opendj.config.DurationPropertyDefinition;
036import org.forgerock.opendj.config.EnumPropertyDefinition;
037import org.forgerock.opendj.config.InstantiableRelationDefinition;
038import org.forgerock.opendj.config.IntegerPropertyDefinition;
039import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
040import org.forgerock.opendj.config.ManagedObjectDefinition;
041import org.forgerock.opendj.config.ManagedObjectNotFoundException;
042import org.forgerock.opendj.config.PropertyException;
043import org.forgerock.opendj.config.PropertyOption;
044import org.forgerock.opendj.config.PropertyProvider;
045import org.forgerock.opendj.config.server.ConfigException;
046import org.forgerock.opendj.config.server.ConfigurationAddListener;
047import org.forgerock.opendj.config.server.ConfigurationChangeListener;
048import org.forgerock.opendj.config.server.ConfigurationDeleteListener;
049import org.forgerock.opendj.config.server.ServerManagedObject;
050import org.forgerock.opendj.config.SizePropertyDefinition;
051import org.forgerock.opendj.config.StringPropertyDefinition;
052import org.forgerock.opendj.config.Tag;
053import org.forgerock.opendj.ldap.DN;
054import org.forgerock.opendj.ldap.LdapException;
055import org.forgerock.opendj.server.config.client.BackendIndexCfgClient;
056import org.forgerock.opendj.server.config.client.BackendVLVIndexCfgClient;
057import org.forgerock.opendj.server.config.client.PDBBackendCfgClient;
058import org.forgerock.opendj.server.config.meta.BackendCfgDefn.WritabilityMode;
059import org.forgerock.opendj.server.config.server.BackendCfg;
060import org.forgerock.opendj.server.config.server.BackendIndexCfg;
061import org.forgerock.opendj.server.config.server.BackendVLVIndexCfg;
062import org.forgerock.opendj.server.config.server.PDBBackendCfg;
063import org.forgerock.opendj.server.config.server.PluggableBackendCfg;
064
065
066
067/**
068 * An interface for querying the PDB Backend managed object definition
069 * meta information.
070 * <p>
071 * A PDB Backend stores application data in a Persistit database.
072 */
073public final class PDBBackendCfgDefn extends ManagedObjectDefinition<PDBBackendCfgClient, PDBBackendCfg> {
074
075  /** The singleton configuration definition instance. */
076  private static final PDBBackendCfgDefn INSTANCE = new PDBBackendCfgDefn();
077
078
079
080  /** The "db-cache-percent" property definition. */
081  private static final IntegerPropertyDefinition PD_DB_CACHE_PERCENT;
082
083
084
085  /** The "db-cache-size" property definition. */
086  private static final SizePropertyDefinition PD_DB_CACHE_SIZE;
087
088
089
090  /** The "db-checkpointer-wakeup-interval" property definition. */
091  private static final DurationPropertyDefinition PD_DB_CHECKPOINTER_WAKEUP_INTERVAL;
092
093
094
095  /** The "db-directory" property definition. */
096  private static final StringPropertyDefinition PD_DB_DIRECTORY;
097
098
099
100  /** The "db-directory-permissions" property definition. */
101  private static final StringPropertyDefinition PD_DB_DIRECTORY_PERMISSIONS;
102
103
104
105  /** The "db-txn-no-sync" property definition. */
106  private static final BooleanPropertyDefinition PD_DB_TXN_NO_SYNC;
107
108
109
110  /** The "disk-full-threshold" property definition. */
111  private static final SizePropertyDefinition PD_DISK_FULL_THRESHOLD;
112
113
114
115  /** The "disk-low-threshold" property definition. */
116  private static final SizePropertyDefinition PD_DISK_LOW_THRESHOLD;
117
118
119
120  /** The "java-class" property definition. */
121  private static final ClassPropertyDefinition PD_JAVA_CLASS;
122
123
124
125  /** Build the "db-cache-percent" property definition. */
126  static {
127      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "db-cache-percent");
128      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-cache-percent"));
129      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("50");
130      builder.setDefaultBehaviorProvider(provider);
131      builder.setUpperLimit(90);
132      builder.setLowerLimit(1);
133      PD_DB_CACHE_PERCENT = builder.getInstance();
134      INSTANCE.registerPropertyDefinition(PD_DB_CACHE_PERCENT);
135  }
136
137
138
139  /** Build the "db-cache-size" property definition. */
140  static {
141      SizePropertyDefinition.Builder builder = SizePropertyDefinition.createBuilder(INSTANCE, "db-cache-size");
142      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-cache-size"));
143      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("0 MB");
144      builder.setDefaultBehaviorProvider(provider);
145      builder.setLowerLimit("0 MB");
146      PD_DB_CACHE_SIZE = builder.getInstance();
147      INSTANCE.registerPropertyDefinition(PD_DB_CACHE_SIZE);
148  }
149
150
151
152  /** Build the "db-checkpointer-wakeup-interval" property definition. */
153  static {
154      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "db-checkpointer-wakeup-interval");
155      builder.setOption(PropertyOption.ADVANCED);
156      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-checkpointer-wakeup-interval"));
157      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("15s");
158      builder.setDefaultBehaviorProvider(provider);
159      builder.setBaseUnit("s");
160      builder.setUpperLimit("3600");
161      builder.setLowerLimit("10");
162      PD_DB_CHECKPOINTER_WAKEUP_INTERVAL = builder.getInstance();
163      INSTANCE.registerPropertyDefinition(PD_DB_CHECKPOINTER_WAKEUP_INTERVAL);
164  }
165
166
167
168  /** Build the "db-directory" property definition. */
169  static {
170      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "db-directory");
171      builder.setOption(PropertyOption.MANDATORY);
172      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "db-directory"));
173      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("db");
174      builder.setDefaultBehaviorProvider(provider);
175      PD_DB_DIRECTORY = builder.getInstance();
176      INSTANCE.registerPropertyDefinition(PD_DB_DIRECTORY);
177  }
178
179
180
181  /** Build the "db-directory-permissions" property definition. */
182  static {
183      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "db-directory-permissions");
184      builder.setOption(PropertyOption.ADVANCED);
185      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.SERVER_RESTART, INSTANCE, "db-directory-permissions"));
186      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("700");
187      builder.setDefaultBehaviorProvider(provider);
188      builder.setPattern("^7[0-7][0-7]$", "MODE");
189      PD_DB_DIRECTORY_PERMISSIONS = builder.getInstance();
190      INSTANCE.registerPropertyDefinition(PD_DB_DIRECTORY_PERMISSIONS);
191  }
192
193
194
195  /** Build the "db-txn-no-sync" property definition. */
196  static {
197      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "db-txn-no-sync");
198      builder.setOption(PropertyOption.ADVANCED);
199      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "db-txn-no-sync"));
200      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true");
201      builder.setDefaultBehaviorProvider(provider);
202      PD_DB_TXN_NO_SYNC = builder.getInstance();
203      INSTANCE.registerPropertyDefinition(PD_DB_TXN_NO_SYNC);
204  }
205
206
207
208  /** Build the "disk-full-threshold" property definition. */
209  static {
210      SizePropertyDefinition.Builder builder = SizePropertyDefinition.createBuilder(INSTANCE, "disk-full-threshold");
211      builder.setOption(PropertyOption.ADVANCED);
212      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "disk-full-threshold"));
213      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("100 megabytes");
214      builder.setDefaultBehaviorProvider(provider);
215      builder.setLowerLimit("0");
216      PD_DISK_FULL_THRESHOLD = builder.getInstance();
217      INSTANCE.registerPropertyDefinition(PD_DISK_FULL_THRESHOLD);
218  }
219
220
221
222  /** Build the "disk-low-threshold" property definition. */
223  static {
224      SizePropertyDefinition.Builder builder = SizePropertyDefinition.createBuilder(INSTANCE, "disk-low-threshold");
225      builder.setOption(PropertyOption.ADVANCED);
226      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "disk-low-threshold"));
227      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("200 megabytes");
228      builder.setDefaultBehaviorProvider(provider);
229      builder.setLowerLimit("0");
230      PD_DISK_LOW_THRESHOLD = builder.getInstance();
231      INSTANCE.registerPropertyDefinition(PD_DISK_LOW_THRESHOLD);
232  }
233
234
235
236  /** Build the "java-class" property definition. */
237  static {
238      ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class");
239      builder.setOption(PropertyOption.MANDATORY);
240      builder.setOption(PropertyOption.ADVANCED);
241      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class"));
242      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.backends.pdb.PDBBackend");
243      builder.setDefaultBehaviorProvider(provider);
244      builder.addInstanceOf("org.opends.server.api.Backend");
245      PD_JAVA_CLASS = builder.getInstance();
246      INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS);
247  }
248
249
250
251  // Register the tags associated with this managed object definition.
252  static {
253    INSTANCE.registerTag(Tag.valueOf("database"));
254  }
255
256
257
258  /**
259   * Get the PDB Backend configuration definition singleton.
260   *
261   * @return Returns the PDB Backend configuration definition
262   *         singleton.
263   */
264  public static PDBBackendCfgDefn getInstance() {
265    return INSTANCE;
266  }
267
268
269
270  /**
271   * Private constructor.
272   */
273  private PDBBackendCfgDefn() {
274    super("pdb-backend", PluggableBackendCfgDefn.getInstance());
275  }
276
277
278
279  /** {@inheritDoc} */
280  public PDBBackendCfgClient createClientConfiguration(
281      ManagedObject<? extends PDBBackendCfgClient> impl) {
282    return new PDBBackendCfgClientImpl(impl);
283  }
284
285
286
287  /** {@inheritDoc} */
288  public PDBBackendCfg createServerConfiguration(
289      ServerManagedObject<? extends PDBBackendCfg> impl) {
290    return new PDBBackendCfgServerImpl(impl);
291  }
292
293
294
295  /** {@inheritDoc} */
296  public Class<PDBBackendCfg> getServerConfigurationClass() {
297    return PDBBackendCfg.class;
298  }
299
300
301
302  /**
303   * Get the "backend-id" property definition.
304   * <p>
305   * Specifies a name to identify the associated backend.
306   * <p>
307   * The name must be unique among all backends in the server. The
308   * backend ID may not be altered after the backend is created in the
309   * server.
310   *
311   * @return Returns the "backend-id" property definition.
312   */
313  public StringPropertyDefinition getBackendIdPropertyDefinition() {
314    return PluggableBackendCfgDefn.getInstance().getBackendIdPropertyDefinition();
315  }
316
317
318
319  /**
320   * Get the "base-dn" property definition.
321   * <p>
322   * Specifies the base DN(s) for the data that the backend handles.
323   * <p>
324   * A single backend may be responsible for one or more base DNs.
325   * Note that no two backends may have the same base DN although one
326   * backend may have a base DN that is below a base DN provided by
327   * another backend (similar to the use of sub-suffixes in the Sun
328   * Java System Directory Server). If any of the base DNs is
329   * subordinate to a base DN for another backend, then all base DNs
330   * for that backend must be subordinate to that same base DN.
331   *
332   * @return Returns the "base-dn" property definition.
333   */
334  public DNPropertyDefinition getBaseDNPropertyDefinition() {
335    return PluggableBackendCfgDefn.getInstance().getBaseDNPropertyDefinition();
336  }
337
338
339
340  /**
341   * Get the "cipher-key-length" property definition.
342   * <p>
343   * Specifies the key length in bits for the preferred cipher.
344   *
345   * @return Returns the "cipher-key-length" property definition.
346   */
347  public IntegerPropertyDefinition getCipherKeyLengthPropertyDefinition() {
348    return PluggableBackendCfgDefn.getInstance().getCipherKeyLengthPropertyDefinition();
349  }
350
351
352
353  /**
354   * Get the "cipher-transformation" property definition.
355   * <p>
356   * Specifies the cipher for the directory server. The syntax is
357   * "algorithm/mode/padding".
358   * <p>
359   * The full transformation is required: specifying only an algorithm
360   * and allowing the cipher provider to supply the default mode and
361   * padding is not supported, because there is no guarantee these
362   * default values are the same among different implementations. Some
363   * cipher algorithms, including RC4 and ARCFOUR, do not have a mode
364   * or padding, and hence must be specified using NONE for the mode
365   * field and NoPadding for the padding field. For example,
366   * RC4/NONE/NoPadding.
367   *
368   * @return Returns the "cipher-transformation" property definition.
369   */
370  public StringPropertyDefinition getCipherTransformationPropertyDefinition() {
371    return PluggableBackendCfgDefn.getInstance().getCipherTransformationPropertyDefinition();
372  }
373
374
375
376  /**
377   * Get the "compact-encoding" property definition.
378   * <p>
379   * Indicates whether the backend should use a compact form when
380   * encoding entries by compressing the attribute descriptions and
381   * object class sets.
382   * <p>
383   * Note that this property applies only to the entries themselves
384   * and does not impact the index data.
385   *
386   * @return Returns the "compact-encoding" property definition.
387   */
388  public BooleanPropertyDefinition getCompactEncodingPropertyDefinition() {
389    return PluggableBackendCfgDefn.getInstance().getCompactEncodingPropertyDefinition();
390  }
391
392
393
394  /**
395   * Get the "confidentiality-enabled" property definition.
396   * <p>
397   * Indicates whether the backend should make entries in database
398   * files readable only by Directory Server.
399   * <p>
400   * Confidentiality is achieved by enrypting entries before writing
401   * them to the underlying storage. Entry encryption will protect data
402   * on disk from unauthorised parties reading the files; for complete
403   * protection, also set confidentiality for sensitive attributes
404   * indexes. The property cannot be set to false if some of the
405   * indexes have confidentiality set to true.
406   *
407   * @return Returns the "confidentiality-enabled" property definition.
408   */
409  public BooleanPropertyDefinition getConfidentialityEnabledPropertyDefinition() {
410    return PluggableBackendCfgDefn.getInstance().getConfidentialityEnabledPropertyDefinition();
411  }
412
413
414
415  /**
416   * Get the "db-cache-percent" property definition.
417   * <p>
418   * Specifies the percentage of JVM memory to allocate to the
419   * database cache.
420   * <p>
421   * Specifies the percentage of memory available to the JVM that
422   * should be used for caching database contents. Note that this is
423   * only used if the value of the db-cache-size property is set to "0
424   * MB". Otherwise, the value of that property is used instead to
425   * control the cache size configuration.
426   *
427   * @return Returns the "db-cache-percent" property definition.
428   */
429  public IntegerPropertyDefinition getDBCachePercentPropertyDefinition() {
430    return PD_DB_CACHE_PERCENT;
431  }
432
433
434
435  /**
436   * Get the "db-cache-size" property definition.
437   * <p>
438   * The amount of JVM memory to allocate to the database cache.
439   * <p>
440   * Specifies the amount of memory that should be used for caching
441   * database contents. A value of "0 MB" indicates that the
442   * db-cache-percent property should be used instead to specify the
443   * cache size.
444   *
445   * @return Returns the "db-cache-size" property definition.
446   */
447  public SizePropertyDefinition getDBCacheSizePropertyDefinition() {
448    return PD_DB_CACHE_SIZE;
449  }
450
451
452
453  /**
454   * Get the "db-checkpointer-wakeup-interval" property definition.
455   * <p>
456   * Specifies the maximum length of time that may pass between
457   * checkpoints.
458   * <p>
459   * This setting controls the elapsed time between attempts to write
460   * a checkpoint to the journal. A longer interval allows more updates
461   * to accumulate in buffers before they are required to be written to
462   * disk, but also potentially causes recovery from an abrupt
463   * termination (crash) to take more time.
464   *
465   * @return Returns the "db-checkpointer-wakeup-interval" property definition.
466   */
467  public DurationPropertyDefinition getDBCheckpointerWakeupIntervalPropertyDefinition() {
468    return PD_DB_CHECKPOINTER_WAKEUP_INTERVAL;
469  }
470
471
472
473  /**
474   * Get the "db-directory" property definition.
475   * <p>
476   * Specifies the path to the filesystem directory that is used to
477   * hold the Persistit database files containing the data for this
478   * backend.
479   * <p>
480   * The path may be either an absolute path or a path relative to the
481   * directory containing the base of the OpenDJ directory server
482   * installation. The path may be any valid directory path in which
483   * the server has appropriate permissions to read and write files and
484   * has sufficient space to hold the database contents.
485   *
486   * @return Returns the "db-directory" property definition.
487   */
488  public StringPropertyDefinition getDBDirectoryPropertyDefinition() {
489    return PD_DB_DIRECTORY;
490  }
491
492
493
494  /**
495   * Get the "db-directory-permissions" property definition.
496   * <p>
497   * Specifies the permissions that should be applied to the directory
498   * containing the server database files.
499   * <p>
500   * They should be expressed as three-digit octal values, which is
501   * the traditional representation for UNIX file permissions. The
502   * three digits represent the permissions that are available for the
503   * directory's owner, group members, and other users (in that order),
504   * and each digit is the octal representation of the read, write, and
505   * execute bits. Note that this only impacts permissions on the
506   * database directory and not on the files written into that
507   * directory. On UNIX systems, the user's umask controls permissions
508   * given to the database files.
509   *
510   * @return Returns the "db-directory-permissions" property definition.
511   */
512  public StringPropertyDefinition getDBDirectoryPermissionsPropertyDefinition() {
513    return PD_DB_DIRECTORY_PERMISSIONS;
514  }
515
516
517
518  /**
519   * Get the "db-txn-no-sync" property definition.
520   * <p>
521   * Indicates whether database writes should be primarily written to
522   * an internal buffer but not immediately written to disk.
523   * <p>
524   * Setting the value of this configuration attribute to "true" may
525   * improve write performance but could cause the most recent changes
526   * to be lost if the OpenDJ directory server or the underlying JVM
527   * exits abnormally, or if an OS or hardware failure occurs (a
528   * behavior similar to running with transaction durability disabled
529   * in the Sun Java System Directory Server).
530   *
531   * @return Returns the "db-txn-no-sync" property definition.
532   */
533  public BooleanPropertyDefinition getDBTxnNoSyncPropertyDefinition() {
534    return PD_DB_TXN_NO_SYNC;
535  }
536
537
538
539  /**
540   * Get the "disk-full-threshold" property definition.
541   * <p>
542   * Full disk threshold to limit database updates
543   * <p>
544   * When the available free space on the disk used by this database
545   * instance falls below the value specified, no updates are permitted
546   * and the server returns an UNWILLING_TO_PERFORM error. Updates are
547   * allowed again as soon as free space rises above the threshold.
548   *
549   * @return Returns the "disk-full-threshold" property definition.
550   */
551  public SizePropertyDefinition getDiskFullThresholdPropertyDefinition() {
552    return PD_DISK_FULL_THRESHOLD;
553  }
554
555
556
557  /**
558   * Get the "disk-low-threshold" property definition.
559   * <p>
560   * Low disk threshold to limit database updates
561   * <p>
562   * Specifies the "low" free space on the disk. When the available
563   * free space on the disk used by this database instance falls below
564   * the value specified, protocol updates on this database are
565   * permitted only by a user with the BYPASS_LOCKDOWN privilege.
566   *
567   * @return Returns the "disk-low-threshold" property definition.
568   */
569  public SizePropertyDefinition getDiskLowThresholdPropertyDefinition() {
570    return PD_DISK_LOW_THRESHOLD;
571  }
572
573
574
575  /**
576   * Get the "enabled" property definition.
577   * <p>
578   * Indicates whether the backend is enabled in the server.
579   * <p>
580   * If a backend is not enabled, then its contents are not accessible
581   * when processing operations.
582   *
583   * @return Returns the "enabled" property definition.
584   */
585  public BooleanPropertyDefinition getEnabledPropertyDefinition() {
586    return PluggableBackendCfgDefn.getInstance().getEnabledPropertyDefinition();
587  }
588
589
590
591  /**
592   * Get the "entries-compressed" property definition.
593   * <p>
594   * Indicates whether the backend should attempt to compress entries
595   * before storing them in the database.
596   * <p>
597   * Note that this property applies only to the entries themselves
598   * and does not impact the index data. Further, the effectiveness of
599   * the compression is based on the type of data contained in the
600   * entry.
601   *
602   * @return Returns the "entries-compressed" property definition.
603   */
604  public BooleanPropertyDefinition getEntriesCompressedPropertyDefinition() {
605    return PluggableBackendCfgDefn.getInstance().getEntriesCompressedPropertyDefinition();
606  }
607
608
609
610  /**
611   * Get the "import-offheap-memory-size" property definition.
612   * <p>
613   * Specifies the amount of off-heap memory dedicated to the online
614   * operation (import-ldif, rebuild-index).
615   *
616   * @return Returns the "import-offheap-memory-size" property definition.
617   */
618  public SizePropertyDefinition getImportOffheapMemorySizePropertyDefinition() {
619    return PluggableBackendCfgDefn.getInstance().getImportOffheapMemorySizePropertyDefinition();
620  }
621
622
623
624  /**
625   * Get the "index-entry-limit" property definition.
626   * <p>
627   * Specifies the maximum number of entries that is allowed to match
628   * a given index key before that particular index key is no longer
629   * maintained.
630   * <p>
631   * This property is analogous to the ALL IDs threshold in the Sun
632   * Java System Directory Server. Note that this is the default limit
633   * for the backend, and it may be overridden on a per-attribute
634   * basis.A value of 0 means there is no limit.
635   *
636   * @return Returns the "index-entry-limit" property definition.
637   */
638  public IntegerPropertyDefinition getIndexEntryLimitPropertyDefinition() {
639    return PluggableBackendCfgDefn.getInstance().getIndexEntryLimitPropertyDefinition();
640  }
641
642
643
644  /**
645   * Get the "index-filter-analyzer-enabled" property definition.
646   * <p>
647   * Indicates whether to gather statistical information about the
648   * search filters processed by the directory server while evaluating
649   * the usage of indexes.
650   * <p>
651   * Analyzing indexes requires gathering search filter usage patterns
652   * from user requests, especially for values as specified in the
653   * filters and subsequently looking the status of those values into
654   * the index files. When a search requests is processed, internal or
655   * user generated, a first phase uses indexes to find potential
656   * entries to be returned. Depending on the search filter, if the
657   * index of one of the specified attributes matches too many entries
658   * (exceeds the index entry limit), the search becomes non-indexed.
659   * In any case, all entries thus gathered (or the entire DIT) are
660   * matched against the filter for actually returning the search
661   * result.
662   *
663   * @return Returns the "index-filter-analyzer-enabled" property definition.
664   */
665  public BooleanPropertyDefinition getIndexFilterAnalyzerEnabledPropertyDefinition() {
666    return PluggableBackendCfgDefn.getInstance().getIndexFilterAnalyzerEnabledPropertyDefinition();
667  }
668
669
670
671  /**
672   * Get the "index-filter-analyzer-max-filters" property definition.
673   * <p>
674   * The maximum number of search filter statistics to keep.
675   * <p>
676   * When the maximum number of search filter is reached, the least
677   * used one will be deleted.
678   *
679   * @return Returns the "index-filter-analyzer-max-filters" property definition.
680   */
681  public IntegerPropertyDefinition getIndexFilterAnalyzerMaxFiltersPropertyDefinition() {
682    return PluggableBackendCfgDefn.getInstance().getIndexFilterAnalyzerMaxFiltersPropertyDefinition();
683  }
684
685
686
687  /**
688   * Get the "java-class" property definition.
689   * <p>
690   * Specifies the fully-qualified name of the Java class that
691   * provides the backend implementation.
692   *
693   * @return Returns the "java-class" property definition.
694   */
695  public ClassPropertyDefinition getJavaClassPropertyDefinition() {
696    return PD_JAVA_CLASS;
697  }
698
699
700
701  /**
702   * Get the "preload-time-limit" property definition.
703   * <p>
704   * Specifies the length of time that the backend is allowed to spend
705   * "pre-loading" data when it is initialized.
706   * <p>
707   * The pre-load process is used to pre-populate the database cache,
708   * so that it can be more quickly available when the server is
709   * processing requests. A duration of zero means there is no
710   * pre-load.
711   *
712   * @return Returns the "preload-time-limit" property definition.
713   */
714  public DurationPropertyDefinition getPreloadTimeLimitPropertyDefinition() {
715    return PluggableBackendCfgDefn.getInstance().getPreloadTimeLimitPropertyDefinition();
716  }
717
718
719
720  /**
721   * Get the "writability-mode" property definition.
722   * <p>
723   * Specifies the behavior that the backend should use when
724   * processing write operations.
725   *
726   * @return Returns the "writability-mode" property definition.
727   */
728  public EnumPropertyDefinition<WritabilityMode> getWritabilityModePropertyDefinition() {
729    return PluggableBackendCfgDefn.getInstance().getWritabilityModePropertyDefinition();
730  }
731
732
733
734  /**
735   * Get the "backend-indexes" relation definition.
736   *
737   * @return Returns the "backend-indexes" relation definition.
738   */
739  public InstantiableRelationDefinition<BackendIndexCfgClient,BackendIndexCfg> getBackendIndexesRelationDefinition() {
740    return PluggableBackendCfgDefn.getInstance().getBackendIndexesRelationDefinition();
741  }
742
743
744
745  /**
746   * Get the "backend-vlv-indexes" relation definition.
747   *
748   * @return Returns the "backend-vlv-indexes" relation definition.
749   */
750  public InstantiableRelationDefinition<BackendVLVIndexCfgClient,BackendVLVIndexCfg> getBackendVLVIndexesRelationDefinition() {
751    return PluggableBackendCfgDefn.getInstance().getBackendVLVIndexesRelationDefinition();
752  }
753
754
755
756  /**
757   * Managed object client implementation.
758   */
759  private static class PDBBackendCfgClientImpl implements
760    PDBBackendCfgClient {
761
762    /** Private implementation. */
763    private ManagedObject<? extends PDBBackendCfgClient> impl;
764
765
766
767    /** Private constructor. */
768    private PDBBackendCfgClientImpl(
769        ManagedObject<? extends PDBBackendCfgClient> impl) {
770      this.impl = impl;
771    }
772
773
774
775    /** {@inheritDoc} */
776    public String getBackendId() {
777      return impl.getPropertyValue(INSTANCE.getBackendIdPropertyDefinition());
778    }
779
780
781
782    /** {@inheritDoc} */
783    public void setBackendId(String value) throws PropertyException {
784      impl.setPropertyValue(INSTANCE.getBackendIdPropertyDefinition(), value);
785    }
786
787
788
789    /** {@inheritDoc} */
790    public SortedSet<DN> getBaseDN() {
791      return impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition());
792    }
793
794
795
796    /** {@inheritDoc} */
797    public void setBaseDN(Collection<DN> values) {
798      impl.setPropertyValues(INSTANCE.getBaseDNPropertyDefinition(), values);
799    }
800
801
802
803    /** {@inheritDoc} */
804    public int getCipherKeyLength() {
805      return impl.getPropertyValue(INSTANCE.getCipherKeyLengthPropertyDefinition());
806    }
807
808
809
810    /** {@inheritDoc} */
811    public void setCipherKeyLength(Integer value) {
812      impl.setPropertyValue(INSTANCE.getCipherKeyLengthPropertyDefinition(), value);
813    }
814
815
816
817    /** {@inheritDoc} */
818    public String getCipherTransformation() {
819      return impl.getPropertyValue(INSTANCE.getCipherTransformationPropertyDefinition());
820    }
821
822
823
824    /** {@inheritDoc} */
825    public void setCipherTransformation(String value) {
826      impl.setPropertyValue(INSTANCE.getCipherTransformationPropertyDefinition(), value);
827    }
828
829
830
831    /** {@inheritDoc} */
832    public boolean isCompactEncoding() {
833      return impl.getPropertyValue(INSTANCE.getCompactEncodingPropertyDefinition());
834    }
835
836
837
838    /** {@inheritDoc} */
839    public void setCompactEncoding(Boolean value) {
840      impl.setPropertyValue(INSTANCE.getCompactEncodingPropertyDefinition(), value);
841    }
842
843
844
845    /** {@inheritDoc} */
846    public boolean isConfidentialityEnabled() {
847      return impl.getPropertyValue(INSTANCE.getConfidentialityEnabledPropertyDefinition());
848    }
849
850
851
852    /** {@inheritDoc} */
853    public void setConfidentialityEnabled(Boolean value) {
854      impl.setPropertyValue(INSTANCE.getConfidentialityEnabledPropertyDefinition(), value);
855    }
856
857
858
859    /** {@inheritDoc} */
860    public int getDBCachePercent() {
861      return impl.getPropertyValue(INSTANCE.getDBCachePercentPropertyDefinition());
862    }
863
864
865
866    /** {@inheritDoc} */
867    public void setDBCachePercent(Integer value) {
868      impl.setPropertyValue(INSTANCE.getDBCachePercentPropertyDefinition(), value);
869    }
870
871
872
873    /** {@inheritDoc} */
874    public long getDBCacheSize() {
875      return impl.getPropertyValue(INSTANCE.getDBCacheSizePropertyDefinition());
876    }
877
878
879
880    /** {@inheritDoc} */
881    public void setDBCacheSize(Long value) {
882      impl.setPropertyValue(INSTANCE.getDBCacheSizePropertyDefinition(), value);
883    }
884
885
886
887    /** {@inheritDoc} */
888    public long getDBCheckpointerWakeupInterval() {
889      return impl.getPropertyValue(INSTANCE.getDBCheckpointerWakeupIntervalPropertyDefinition());
890    }
891
892
893
894    /** {@inheritDoc} */
895    public void setDBCheckpointerWakeupInterval(Long value) {
896      impl.setPropertyValue(INSTANCE.getDBCheckpointerWakeupIntervalPropertyDefinition(), value);
897    }
898
899
900
901    /** {@inheritDoc} */
902    public String getDBDirectory() {
903      return impl.getPropertyValue(INSTANCE.getDBDirectoryPropertyDefinition());
904    }
905
906
907
908    /** {@inheritDoc} */
909    public void setDBDirectory(String value) {
910      impl.setPropertyValue(INSTANCE.getDBDirectoryPropertyDefinition(), value);
911    }
912
913
914
915    /** {@inheritDoc} */
916    public String getDBDirectoryPermissions() {
917      return impl.getPropertyValue(INSTANCE.getDBDirectoryPermissionsPropertyDefinition());
918    }
919
920
921
922    /** {@inheritDoc} */
923    public void setDBDirectoryPermissions(String value) {
924      impl.setPropertyValue(INSTANCE.getDBDirectoryPermissionsPropertyDefinition(), value);
925    }
926
927
928
929    /** {@inheritDoc} */
930    public boolean isDBTxnNoSync() {
931      return impl.getPropertyValue(INSTANCE.getDBTxnNoSyncPropertyDefinition());
932    }
933
934
935
936    /** {@inheritDoc} */
937    public void setDBTxnNoSync(Boolean value) {
938      impl.setPropertyValue(INSTANCE.getDBTxnNoSyncPropertyDefinition(), value);
939    }
940
941
942
943    /** {@inheritDoc} */
944    public long getDiskFullThreshold() {
945      return impl.getPropertyValue(INSTANCE.getDiskFullThresholdPropertyDefinition());
946    }
947
948
949
950    /** {@inheritDoc} */
951    public void setDiskFullThreshold(Long value) {
952      impl.setPropertyValue(INSTANCE.getDiskFullThresholdPropertyDefinition(), value);
953    }
954
955
956
957    /** {@inheritDoc} */
958    public long getDiskLowThreshold() {
959      return impl.getPropertyValue(INSTANCE.getDiskLowThresholdPropertyDefinition());
960    }
961
962
963
964    /** {@inheritDoc} */
965    public void setDiskLowThreshold(Long value) {
966      impl.setPropertyValue(INSTANCE.getDiskLowThresholdPropertyDefinition(), value);
967    }
968
969
970
971    /** {@inheritDoc} */
972    public Boolean isEnabled() {
973      return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
974    }
975
976
977
978    /** {@inheritDoc} */
979    public void setEnabled(boolean value) {
980      impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value);
981    }
982
983
984
985    /** {@inheritDoc} */
986    public boolean isEntriesCompressed() {
987      return impl.getPropertyValue(INSTANCE.getEntriesCompressedPropertyDefinition());
988    }
989
990
991
992    /** {@inheritDoc} */
993    public void setEntriesCompressed(Boolean value) {
994      impl.setPropertyValue(INSTANCE.getEntriesCompressedPropertyDefinition(), value);
995    }
996
997
998
999    /** {@inheritDoc} */
1000    public Long getImportOffheapMemorySize() {
1001      return impl.getPropertyValue(INSTANCE.getImportOffheapMemorySizePropertyDefinition());
1002    }
1003
1004
1005
1006    /** {@inheritDoc} */
1007    public void setImportOffheapMemorySize(Long value) {
1008      impl.setPropertyValue(INSTANCE.getImportOffheapMemorySizePropertyDefinition(), value);
1009    }
1010
1011
1012
1013    /** {@inheritDoc} */
1014    public int getIndexEntryLimit() {
1015      return impl.getPropertyValue(INSTANCE.getIndexEntryLimitPropertyDefinition());
1016    }
1017
1018
1019
1020    /** {@inheritDoc} */
1021    public void setIndexEntryLimit(Integer value) {
1022      impl.setPropertyValue(INSTANCE.getIndexEntryLimitPropertyDefinition(), value);
1023    }
1024
1025
1026
1027    /** {@inheritDoc} */
1028    public boolean isIndexFilterAnalyzerEnabled() {
1029      return impl.getPropertyValue(INSTANCE.getIndexFilterAnalyzerEnabledPropertyDefinition());
1030    }
1031
1032
1033
1034    /** {@inheritDoc} */
1035    public void setIndexFilterAnalyzerEnabled(Boolean value) {
1036      impl.setPropertyValue(INSTANCE.getIndexFilterAnalyzerEnabledPropertyDefinition(), value);
1037    }
1038
1039
1040
1041    /** {@inheritDoc} */
1042    public int getIndexFilterAnalyzerMaxFilters() {
1043      return impl.getPropertyValue(INSTANCE.getIndexFilterAnalyzerMaxFiltersPropertyDefinition());
1044    }
1045
1046
1047
1048    /** {@inheritDoc} */
1049    public void setIndexFilterAnalyzerMaxFilters(Integer value) {
1050      impl.setPropertyValue(INSTANCE.getIndexFilterAnalyzerMaxFiltersPropertyDefinition(), value);
1051    }
1052
1053
1054
1055    /** {@inheritDoc} */
1056    public String getJavaClass() {
1057      return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
1058    }
1059
1060
1061
1062    /** {@inheritDoc} */
1063    public void setJavaClass(String value) {
1064      impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value);
1065    }
1066
1067
1068
1069    /** {@inheritDoc} */
1070    public long getPreloadTimeLimit() {
1071      return impl.getPropertyValue(INSTANCE.getPreloadTimeLimitPropertyDefinition());
1072    }
1073
1074
1075
1076    /** {@inheritDoc} */
1077    public void setPreloadTimeLimit(Long value) {
1078      impl.setPropertyValue(INSTANCE.getPreloadTimeLimitPropertyDefinition(), value);
1079    }
1080
1081
1082
1083    /** {@inheritDoc} */
1084    public WritabilityMode getWritabilityMode() {
1085      return impl.getPropertyValue(INSTANCE.getWritabilityModePropertyDefinition());
1086    }
1087
1088
1089
1090    /** {@inheritDoc} */
1091    public void setWritabilityMode(WritabilityMode value) {
1092      impl.setPropertyValue(INSTANCE.getWritabilityModePropertyDefinition(), value);
1093    }
1094
1095
1096
1097    /** {@inheritDoc} */
1098    public String[] listBackendIndexes() throws ConcurrentModificationException,
1099        LdapException {
1100      return impl.listChildren(INSTANCE.getBackendIndexesRelationDefinition());
1101    }
1102
1103
1104
1105    /** {@inheritDoc} */
1106    public BackendIndexCfgClient getBackendIndex(String name)
1107        throws DefinitionDecodingException, ManagedObjectDecodingException,
1108        ManagedObjectNotFoundException, ConcurrentModificationException,
1109        LdapException {
1110      return impl.getChild(INSTANCE.getBackendIndexesRelationDefinition(), name).getConfiguration();
1111    }
1112
1113
1114
1115    /** {@inheritDoc} */
1116    public <M extends BackendIndexCfgClient> M createBackendIndex(
1117        ManagedObjectDefinition<M, ? extends BackendIndexCfg> d, String name, Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException {
1118      return impl.createChild(INSTANCE.getBackendIndexesRelationDefinition(), d, name, exceptions).getConfiguration();
1119    }
1120
1121
1122
1123    /** {@inheritDoc} */
1124    public void removeBackendIndex(String name)
1125        throws ManagedObjectNotFoundException, ConcurrentModificationException,
1126        OperationRejectedException, LdapException {
1127      impl.removeChild(INSTANCE.getBackendIndexesRelationDefinition(), name);
1128    }
1129
1130
1131
1132    /** {@inheritDoc} */
1133    public String[] listBackendVLVIndexes() throws ConcurrentModificationException,
1134        LdapException {
1135      return impl.listChildren(INSTANCE.getBackendVLVIndexesRelationDefinition());
1136    }
1137
1138
1139
1140    /** {@inheritDoc} */
1141    public BackendVLVIndexCfgClient getBackendVLVIndex(String name)
1142        throws DefinitionDecodingException, ManagedObjectDecodingException,
1143        ManagedObjectNotFoundException, ConcurrentModificationException,
1144        LdapException {
1145      return impl.getChild(INSTANCE.getBackendVLVIndexesRelationDefinition(), name).getConfiguration();
1146    }
1147
1148
1149
1150    /** {@inheritDoc} */
1151    public <M extends BackendVLVIndexCfgClient> M createBackendVLVIndex(
1152        ManagedObjectDefinition<M, ? extends BackendVLVIndexCfg> d, String name, Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException {
1153      return impl.createChild(INSTANCE.getBackendVLVIndexesRelationDefinition(), d, name, exceptions).getConfiguration();
1154    }
1155
1156
1157
1158    /** {@inheritDoc} */
1159    public void removeBackendVLVIndex(String name)
1160        throws ManagedObjectNotFoundException, ConcurrentModificationException,
1161        OperationRejectedException, LdapException {
1162      impl.removeChild(INSTANCE.getBackendVLVIndexesRelationDefinition(), name);
1163    }
1164
1165
1166
1167    /** {@inheritDoc} */
1168    public ManagedObjectDefinition<? extends PDBBackendCfgClient, ? extends PDBBackendCfg> definition() {
1169      return INSTANCE;
1170    }
1171
1172
1173
1174    /** {@inheritDoc} */
1175    public PropertyProvider properties() {
1176      return impl;
1177    }
1178
1179
1180
1181    /** {@inheritDoc} */
1182    public void commit() throws ManagedObjectAlreadyExistsException,
1183        MissingMandatoryPropertiesException, ConcurrentModificationException,
1184        OperationRejectedException, LdapException {
1185      impl.commit();
1186    }
1187
1188
1189
1190    /** {@inheritDoc} */
1191    public String toString() {
1192      return impl.toString();
1193    }
1194  }
1195
1196
1197
1198  /**
1199   * Managed object server implementation.
1200   */
1201  private static class PDBBackendCfgServerImpl implements
1202    PDBBackendCfg {
1203
1204    /** Private implementation. */
1205    private ServerManagedObject<? extends PDBBackendCfg> impl;
1206
1207    /** The value of the "backend-id" property. */
1208    private final String pBackendId;
1209
1210    /** The value of the "base-dn" property. */
1211    private final SortedSet<DN> pBaseDN;
1212
1213    /** The value of the "cipher-key-length" property. */
1214    private final int pCipherKeyLength;
1215
1216    /** The value of the "cipher-transformation" property. */
1217    private final String pCipherTransformation;
1218
1219    /** The value of the "compact-encoding" property. */
1220    private final boolean pCompactEncoding;
1221
1222    /** The value of the "confidentiality-enabled" property. */
1223    private final boolean pConfidentialityEnabled;
1224
1225    /** The value of the "db-cache-percent" property. */
1226    private final int pDBCachePercent;
1227
1228    /** The value of the "db-cache-size" property. */
1229    private final long pDBCacheSize;
1230
1231    /** The value of the "db-checkpointer-wakeup-interval" property. */
1232    private final long pDBCheckpointerWakeupInterval;
1233
1234    /** The value of the "db-directory" property. */
1235    private final String pDBDirectory;
1236
1237    /** The value of the "db-directory-permissions" property. */
1238    private final String pDBDirectoryPermissions;
1239
1240    /** The value of the "db-txn-no-sync" property. */
1241    private final boolean pDBTxnNoSync;
1242
1243    /** The value of the "disk-full-threshold" property. */
1244    private final long pDiskFullThreshold;
1245
1246    /** The value of the "disk-low-threshold" property. */
1247    private final long pDiskLowThreshold;
1248
1249    /** The value of the "enabled" property. */
1250    private final boolean pEnabled;
1251
1252    /** The value of the "entries-compressed" property. */
1253    private final boolean pEntriesCompressed;
1254
1255    /** The value of the "import-offheap-memory-size" property. */
1256    private final Long pImportOffheapMemorySize;
1257
1258    /** The value of the "index-entry-limit" property. */
1259    private final int pIndexEntryLimit;
1260
1261    /** The value of the "index-filter-analyzer-enabled" property. */
1262    private final boolean pIndexFilterAnalyzerEnabled;
1263
1264    /** The value of the "index-filter-analyzer-max-filters" property. */
1265    private final int pIndexFilterAnalyzerMaxFilters;
1266
1267    /** The value of the "java-class" property. */
1268    private final String pJavaClass;
1269
1270    /** The value of the "preload-time-limit" property. */
1271    private final long pPreloadTimeLimit;
1272
1273    /** The value of the "writability-mode" property. */
1274    private final WritabilityMode pWritabilityMode;
1275
1276
1277
1278    /** Private constructor. */
1279    private PDBBackendCfgServerImpl(ServerManagedObject<? extends PDBBackendCfg> impl) {
1280      this.impl = impl;
1281      this.pBackendId = impl.getPropertyValue(INSTANCE.getBackendIdPropertyDefinition());
1282      this.pBaseDN = impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition());
1283      this.pCipherKeyLength = impl.getPropertyValue(INSTANCE.getCipherKeyLengthPropertyDefinition());
1284      this.pCipherTransformation = impl.getPropertyValue(INSTANCE.getCipherTransformationPropertyDefinition());
1285      this.pCompactEncoding = impl.getPropertyValue(INSTANCE.getCompactEncodingPropertyDefinition());
1286      this.pConfidentialityEnabled = impl.getPropertyValue(INSTANCE.getConfidentialityEnabledPropertyDefinition());
1287      this.pDBCachePercent = impl.getPropertyValue(INSTANCE.getDBCachePercentPropertyDefinition());
1288      this.pDBCacheSize = impl.getPropertyValue(INSTANCE.getDBCacheSizePropertyDefinition());
1289      this.pDBCheckpointerWakeupInterval = impl.getPropertyValue(INSTANCE.getDBCheckpointerWakeupIntervalPropertyDefinition());
1290      this.pDBDirectory = impl.getPropertyValue(INSTANCE.getDBDirectoryPropertyDefinition());
1291      this.pDBDirectoryPermissions = impl.getPropertyValue(INSTANCE.getDBDirectoryPermissionsPropertyDefinition());
1292      this.pDBTxnNoSync = impl.getPropertyValue(INSTANCE.getDBTxnNoSyncPropertyDefinition());
1293      this.pDiskFullThreshold = impl.getPropertyValue(INSTANCE.getDiskFullThresholdPropertyDefinition());
1294      this.pDiskLowThreshold = impl.getPropertyValue(INSTANCE.getDiskLowThresholdPropertyDefinition());
1295      this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
1296      this.pEntriesCompressed = impl.getPropertyValue(INSTANCE.getEntriesCompressedPropertyDefinition());
1297      this.pImportOffheapMemorySize = impl.getPropertyValue(INSTANCE.getImportOffheapMemorySizePropertyDefinition());
1298      this.pIndexEntryLimit = impl.getPropertyValue(INSTANCE.getIndexEntryLimitPropertyDefinition());
1299      this.pIndexFilterAnalyzerEnabled = impl.getPropertyValue(INSTANCE.getIndexFilterAnalyzerEnabledPropertyDefinition());
1300      this.pIndexFilterAnalyzerMaxFilters = impl.getPropertyValue(INSTANCE.getIndexFilterAnalyzerMaxFiltersPropertyDefinition());
1301      this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
1302      this.pPreloadTimeLimit = impl.getPropertyValue(INSTANCE.getPreloadTimeLimitPropertyDefinition());
1303      this.pWritabilityMode = impl.getPropertyValue(INSTANCE.getWritabilityModePropertyDefinition());
1304    }
1305
1306
1307
1308    /** {@inheritDoc} */
1309    public void addPDBChangeListener(
1310        ConfigurationChangeListener<PDBBackendCfg> listener) {
1311      impl.registerChangeListener(listener);
1312    }
1313
1314
1315
1316    /** {@inheritDoc} */
1317    public void removePDBChangeListener(
1318        ConfigurationChangeListener<PDBBackendCfg> listener) {
1319      impl.deregisterChangeListener(listener);
1320    }
1321    /** {@inheritDoc} */
1322    public void addPluggableChangeListener(
1323        ConfigurationChangeListener<PluggableBackendCfg> listener) {
1324      impl.registerChangeListener(listener);
1325    }
1326
1327
1328
1329    /** {@inheritDoc} */
1330    public void removePluggableChangeListener(
1331        ConfigurationChangeListener<PluggableBackendCfg> listener) {
1332      impl.deregisterChangeListener(listener);
1333    }
1334    /** {@inheritDoc} */
1335    public void addChangeListener(
1336        ConfigurationChangeListener<BackendCfg> listener) {
1337      impl.registerChangeListener(listener);
1338    }
1339
1340
1341
1342    /** {@inheritDoc} */
1343    public void removeChangeListener(
1344        ConfigurationChangeListener<BackendCfg> listener) {
1345      impl.deregisterChangeListener(listener);
1346    }
1347
1348
1349
1350    /** {@inheritDoc} */
1351    public String getBackendId() {
1352      return pBackendId;
1353    }
1354
1355
1356
1357    /** {@inheritDoc} */
1358    public SortedSet<DN> getBaseDN() {
1359      return pBaseDN;
1360    }
1361
1362
1363
1364    /** {@inheritDoc} */
1365    public int getCipherKeyLength() {
1366      return pCipherKeyLength;
1367    }
1368
1369
1370
1371    /** {@inheritDoc} */
1372    public String getCipherTransformation() {
1373      return pCipherTransformation;
1374    }
1375
1376
1377
1378    /** {@inheritDoc} */
1379    public boolean isCompactEncoding() {
1380      return pCompactEncoding;
1381    }
1382
1383
1384
1385    /** {@inheritDoc} */
1386    public boolean isConfidentialityEnabled() {
1387      return pConfidentialityEnabled;
1388    }
1389
1390
1391
1392    /** {@inheritDoc} */
1393    public int getDBCachePercent() {
1394      return pDBCachePercent;
1395    }
1396
1397
1398
1399    /** {@inheritDoc} */
1400    public long getDBCacheSize() {
1401      return pDBCacheSize;
1402    }
1403
1404
1405
1406    /** {@inheritDoc} */
1407    public long getDBCheckpointerWakeupInterval() {
1408      return pDBCheckpointerWakeupInterval;
1409    }
1410
1411
1412
1413    /** {@inheritDoc} */
1414    public String getDBDirectory() {
1415      return pDBDirectory;
1416    }
1417
1418
1419
1420    /** {@inheritDoc} */
1421    public String getDBDirectoryPermissions() {
1422      return pDBDirectoryPermissions;
1423    }
1424
1425
1426
1427    /** {@inheritDoc} */
1428    public boolean isDBTxnNoSync() {
1429      return pDBTxnNoSync;
1430    }
1431
1432
1433
1434    /** {@inheritDoc} */
1435    public long getDiskFullThreshold() {
1436      return pDiskFullThreshold;
1437    }
1438
1439
1440
1441    /** {@inheritDoc} */
1442    public long getDiskLowThreshold() {
1443      return pDiskLowThreshold;
1444    }
1445
1446
1447
1448    /** {@inheritDoc} */
1449    public boolean isEnabled() {
1450      return pEnabled;
1451    }
1452
1453
1454
1455    /** {@inheritDoc} */
1456    public boolean isEntriesCompressed() {
1457      return pEntriesCompressed;
1458    }
1459
1460
1461
1462    /** {@inheritDoc} */
1463    public Long getImportOffheapMemorySize() {
1464      return pImportOffheapMemorySize;
1465    }
1466
1467
1468
1469    /** {@inheritDoc} */
1470    public int getIndexEntryLimit() {
1471      return pIndexEntryLimit;
1472    }
1473
1474
1475
1476    /** {@inheritDoc} */
1477    public boolean isIndexFilterAnalyzerEnabled() {
1478      return pIndexFilterAnalyzerEnabled;
1479    }
1480
1481
1482
1483    /** {@inheritDoc} */
1484    public int getIndexFilterAnalyzerMaxFilters() {
1485      return pIndexFilterAnalyzerMaxFilters;
1486    }
1487
1488
1489
1490    /** {@inheritDoc} */
1491    public String getJavaClass() {
1492      return pJavaClass;
1493    }
1494
1495
1496
1497    /** {@inheritDoc} */
1498    public long getPreloadTimeLimit() {
1499      return pPreloadTimeLimit;
1500    }
1501
1502
1503
1504    /** {@inheritDoc} */
1505    public WritabilityMode getWritabilityMode() {
1506      return pWritabilityMode;
1507    }
1508
1509
1510
1511    /** {@inheritDoc} */
1512    public String[] listBackendIndexes() {
1513      return impl.listChildren(INSTANCE.getBackendIndexesRelationDefinition());
1514    }
1515
1516
1517
1518    /** {@inheritDoc} */
1519    public BackendIndexCfg getBackendIndex(String name) throws ConfigException {
1520      return impl.getChild(INSTANCE.getBackendIndexesRelationDefinition(), name).getConfiguration();
1521    }
1522
1523
1524
1525    /** {@inheritDoc} */
1526    public void addBackendIndexAddListener(
1527        ConfigurationAddListener<BackendIndexCfg> listener) throws ConfigException {
1528      impl.registerAddListener(INSTANCE.getBackendIndexesRelationDefinition(), listener);
1529    }
1530
1531
1532
1533    /** {@inheritDoc} */
1534    public void removeBackendIndexAddListener(
1535        ConfigurationAddListener<BackendIndexCfg> listener) {
1536      impl.deregisterAddListener(INSTANCE.getBackendIndexesRelationDefinition(), listener);
1537    }
1538
1539
1540
1541    /** {@inheritDoc} */
1542    public void addBackendIndexDeleteListener(
1543        ConfigurationDeleteListener<BackendIndexCfg> listener) throws ConfigException {
1544      impl.registerDeleteListener(INSTANCE.getBackendIndexesRelationDefinition(), listener);
1545    }
1546
1547
1548
1549    /** {@inheritDoc} */
1550    public void removeBackendIndexDeleteListener(
1551        ConfigurationDeleteListener<BackendIndexCfg> listener) {
1552      impl.deregisterDeleteListener(INSTANCE.getBackendIndexesRelationDefinition(), listener);
1553    }
1554
1555
1556
1557    /** {@inheritDoc} */
1558    public String[] listBackendVLVIndexes() {
1559      return impl.listChildren(INSTANCE.getBackendVLVIndexesRelationDefinition());
1560    }
1561
1562
1563
1564    /** {@inheritDoc} */
1565    public BackendVLVIndexCfg getBackendVLVIndex(String name) throws ConfigException {
1566      return impl.getChild(INSTANCE.getBackendVLVIndexesRelationDefinition(), name).getConfiguration();
1567    }
1568
1569
1570
1571    /** {@inheritDoc} */
1572    public void addBackendVLVIndexAddListener(
1573        ConfigurationAddListener<BackendVLVIndexCfg> listener) throws ConfigException {
1574      impl.registerAddListener(INSTANCE.getBackendVLVIndexesRelationDefinition(), listener);
1575    }
1576
1577
1578
1579    /** {@inheritDoc} */
1580    public void removeBackendVLVIndexAddListener(
1581        ConfigurationAddListener<BackendVLVIndexCfg> listener) {
1582      impl.deregisterAddListener(INSTANCE.getBackendVLVIndexesRelationDefinition(), listener);
1583    }
1584
1585
1586
1587    /** {@inheritDoc} */
1588    public void addBackendVLVIndexDeleteListener(
1589        ConfigurationDeleteListener<BackendVLVIndexCfg> listener) throws ConfigException {
1590      impl.registerDeleteListener(INSTANCE.getBackendVLVIndexesRelationDefinition(), listener);
1591    }
1592
1593
1594
1595    /** {@inheritDoc} */
1596    public void removeBackendVLVIndexDeleteListener(
1597        ConfigurationDeleteListener<BackendVLVIndexCfg> listener) {
1598      impl.deregisterDeleteListener(INSTANCE.getBackendVLVIndexesRelationDefinition(), listener);
1599    }
1600
1601
1602
1603    /** {@inheritDoc} */
1604    public Class<? extends PDBBackendCfg> configurationClass() {
1605      return PDBBackendCfg.class;
1606    }
1607
1608
1609
1610    /** {@inheritDoc} */
1611    public DN dn() {
1612      return impl.getDN();
1613    }
1614
1615
1616
1617    /** {@inheritDoc} */
1618    public String toString() {
1619      return impl.toString();
1620    }
1621  }
1622}