From cac49bdd3e51ea6fbd9dc1bae2092ea5653a97ff Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 18 Dec 2014 13:35:15 +0000
Subject: [PATCH] OPENDJ-1602 (CR-5566) New pluggable storage based backend

---
 /dev/null                                                                                                                                |  303 ------------------
 opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PersistitBackendConfiguration.xml |  249 +++++++++++++++
 opendj-sdk/opendj-server3x-adapter/src/test/resources/config/schema/02-config.ldif                                                       |   25 +
 opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml |  327 ++++++++++++++++++++
 4 files changed, 601 insertions(+), 303 deletions(-)

diff --git a/opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileSystemEntryCacheConfiguration.xml b/opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileSystemEntryCacheConfiguration.xml
deleted file mode 100644
index 81c5e5a..0000000
--- a/opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileSystemEntryCacheConfiguration.xml
+++ /dev/null
@@ -1,303 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ! CDDL HEADER START
-  !
-  ! The contents of this file are subject to the terms of the
-  ! Common Development and Distribution License, Version 1.0 only
-  ! (the "License").  You may not use this file except in compliance
-  ! with the License.
-  !
-  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-  ! or http://forgerock.org/license/CDDLv1.0.html.
-  ! See the License for the specific language governing permissions
-  ! and limitations under the License.
-  !
-  ! When distributing Covered Code, include this CDDL HEADER in each
-  ! file and include the License file at legal-notices/CDDLv1_0.txt.
-  ! If applicable, add the following below this CDDL HEADER, with the
-  ! fields enclosed by brackets "[]" replaced with your own identifying
-  ! information:
-  !      Portions Copyright [yyyy] [name of copyright owner]
-  !
-  ! CDDL HEADER END
-  !
-  !
-  !      Copyright 2007-2008 Sun Microsystems, Inc.
-  !      Portions Copyright 2011 ForgeRock AS
-  ! -->
-<adm:managed-object name="file-system-entry-cache"
-  plural-name="file-system-entry-caches"
-  package="org.forgerock.opendj.server.config" extends="entry-cache"
-  xmlns:adm="http://opendj.forgerock.org/admin"
-  xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
-  <adm:synopsis>
-    The
-    <adm:user-friendly-name />
-    is an entry cache implementation which uses a JE database to keep
-    track of the entries.
-  </adm:synopsis>
-  <adm:description>
-    For best performance, the JE database should reside in a memory
-    based file system although any file system will do for this cache
-    to function. Entries are maintained either by FIFO (default) or LRU-based
-    (configurable) list implementation. Cache sizing is based on
-    the size of free space available in the file system, such that if
-    enough memory is free, then adding an entry to the cache will not
-    require purging. If more than the specified size of the file
-    system available space is already consumed, then one or more entries
-    need to be removed in order to make room for a new entry. It is
-    also possible to configure a maximum number of entries for the cache.
-    If this is specified, then the number of entries are not allowed
-    to exceed this value, but it may not be possible to hold this many
-    entries if the available memory fills up first. Other configurable
-    parameters for this cache include the maximum length of time to block
-    while waiting to acquire a lock, and a set of filters that may be
-    used to define criteria for determining which entries are stored in
-    the cache. If a set of filters are provided then an entry must match
-    at least one of them in order to be stored in the cache.
-    JE environment cache size can also be configured either as a percentage
-    of the free memory available in the JVM, or as an absolute size in
-    bytes. This cache has a persistence property which, if enabled,
-    allows for the contents of the cache to persist across server or
-    cache restarts.
-  </adm:description>
-  <adm:profile name="ldap">
-    <ldap:object-class>
-      <ldap:name>ds-cfg-file-system-entry-cache</ldap:name>
-      <ldap:superior>ds-cfg-entry-cache</ldap:superior>
-    </ldap:object-class>
-  </adm:profile>
-  <adm:property name="lock-timeout" advanced="true">
-    <adm:synopsis>
-      The length of time to wait while attempting to acquire a read or
-      write lock.
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>2000.0ms</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:duration base-unit="ms" allow-unlimited="true" />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-lock-timeout</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="max-memory-size">
-    <adm:synopsis>
-      The maximum size of the entry cache in bytes.
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>0b</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:size />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-max-memory-size</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="max-entries">
-    <adm:synopsis>
-      The maximum number of entries allowed in the cache.
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>2147483647</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:integer lower-limit="0" />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-max-entries</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="cache-type">
-    <adm:synopsis>
-      Specifies the policy which should be used for purging entries from
-      the cache.
-    </adm:synopsis>
-    <adm:requires-admin-action>
-      <adm:component-restart />
-    </adm:requires-admin-action>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>fifo</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:enumeration>
-        <adm:value name="fifo">
-          <adm:synopsis>FIFO based entry cache.</adm:synopsis>
-        </adm:value>
-        <adm:value name="lru">
-          <adm:synopsis>LRU based entry cache.</adm:synopsis>
-        </adm:value>
-      </adm:enumeration>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-cache-type</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="cache-directory">
-    <adm:synopsis>
-      Specifies the directory in which the JE environment should store
-      the cache.
-    </adm:synopsis>
-    <adm:requires-admin-action>
-      <adm:component-restart />
-    </adm:requires-admin-action>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>/tmp/OpenDJ.FSCache</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:string />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-cache-directory</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="persistent-cache">
-    <adm:synopsis>
-      Specifies whether the cache should persist across restarts.
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>false</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:boolean />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-persistent-cache</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="compact-encoding">
-    <adm:synopsis>
-      Indicates whether the cache should use a compact form when
-      encoding cache entries by compressing the attribute descriptions
-      and object class sets.
-    </adm:synopsis>
-    <adm:description>
-      Note that compression does not preserve user-supplied
-      capitalization in the object class and attribute type names.
-    </adm:description>
-    <adm:requires-admin-action>
-      <adm:none>
-        <adm:synopsis>
-          Changing this property only affects the encoding of the
-          cache entries put in the cache after the change is made. It
-          will not be retroactively applied to existing cache entries.
-        </adm:synopsis>
-      </adm:none>
-    </adm:requires-admin-action>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>true</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:boolean />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-compact-encoding</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="db-cache-percent">
-    <adm:synopsis>
-      Specifies the maximum memory usage for the internal JE cache as a percentage
-      of the total JVM memory.
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>1</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:integer lower-limit="0" upper-limit="90" />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-db-cache-percent</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="db-cache-size">
-    <adm:synopsis>
-      Specifies the maximum JVM memory usage in bytes for the internal JE cache.
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>0b</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:size />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-db-cache-size</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="je-property" multi-valued="true"
-    advanced="true">
-    <adm:synopsis>
-      Specifies the environment properties for the Berkeley DB Java
-      Edition database providing the backend for this entry cache.
-    </adm:synopsis>
-    <adm:description>
-      Any Berkeley DB Java Edition property can be specified using the
-      following form: property-name=property-value. Refer to the
-      <adm:product-name /> documentation for further information on related
-      properties, their implications and range values. The definitive
-      identification of all the property parameters available in the
-      example.properties file in the Berkeley DB Java Edition distribution.
-    </adm:description>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>je.env.isLocking=false</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:string />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-je-property</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property-reference name="include-filter" />
-  <adm:property-reference name="exclude-filter" />
-  <adm:property-override name="java-class" advanced="true">
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>
-          org.opends.server.extensions.FileSystemEntryCache
-        </adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-  </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PersistitBackendConfiguration.xml b/opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PersistitBackendConfiguration.xml
new file mode 100644
index 0000000..a6faebf
--- /dev/null
+++ b/opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PersistitBackendConfiguration.xml
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ! CDDL HEADER START
+  !
+  ! The contents of this file are subject to the terms of the
+  ! Common Development and Distribution License, Version 1.0 only
+  ! (the "License").  You may not use this file except in compliance
+  ! with the License.
+  !
+  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
+  ! or http://forgerock.org/license/CDDLv1.0.html.
+  ! See the License for the specific language governing permissions
+  ! and limitations under the License.
+  !
+  ! When distributing Covered Code, include this CDDL HEADER in each
+  ! file and include the License file at legal-notices/CDDLv1_0.txt.
+  ! If applicable, add the following below this CDDL HEADER, with the
+  ! fields enclosed by brackets "[]" replaced with your own identifying
+  ! information:
+  !      Portions Copyright [yyyy] [name of copyright owner]
+  !
+  ! CDDL HEADER END
+  !
+  !
+  !      Copyright 2014 ForgeRock AS.
+  ! -->
+<adm:managed-object name="persistit-backend"
+  plural-name="persistit-backends" package="org.forgerock.opendj.server.config"
+  extends="pluggable-backend" xmlns:adm="http://opendj.forgerock.org/admin"
+  xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+  xmlns:cli="http://opendj.forgerock.org/admin-cli">
+  <adm:synopsis>
+    A <adm:user-friendly-name/> stores application
+    data in a Persistit database.
+  </adm:synopsis>
+  <adm:profile name="ldap">
+    <ldap:object-class>
+      <ldap:name>ds-cfg-persistit-backend</ldap:name>
+      <ldap:superior>ds-cfg-pluggable-backend</ldap:superior>
+    </ldap:object-class>
+  </adm:profile>
+  <adm:property-override name="java-class" advanced="true">
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>
+          org.opends.server.backends.pluggable.BackendImpl
+        </adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+  </adm:property-override>
+  <adm:property name="db-directory" mandatory="true">
+    <adm:TODO>Default this to the db/backend-id</adm:TODO>
+    <adm:synopsis>
+      Specifies the path to the filesystem directory that is used
+      to hold the Persistit database files containing the
+      data for this backend.
+    </adm:synopsis>
+    <adm:description>
+      The path may be either an absolute path or a path relative to the
+      directory containing the base of the <adm:product-name /> directory server
+      installation. The path may be any valid directory path in which
+      the server has appropriate permissions to read and write files and
+      has sufficient space to hold the database contents.
+    </adm:description>
+    <adm:requires-admin-action>
+      <adm:component-restart />
+    </adm:requires-admin-action>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>db</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:string />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-db-directory</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="db-directory-permissions" advanced="true">
+    <adm:synopsis>
+      Specifies the permissions that should be applied to the directory
+      containing the server database files.
+    </adm:synopsis>
+    <adm:description>
+      They should be expressed as three-digit octal values, which is the
+      traditional representation for UNIX file permissions. The three
+      digits represent the permissions that are available for the
+      directory's owner, group members, and other users (in that order),
+      and each digit is the octal representation of the read, write, and
+      execute bits. Note that this only impacts permissions on the
+      database directory and not on the files written into that
+      directory. On UNIX systems, the user's umask controls
+      permissions given to the database files.
+    </adm:description>
+    <adm:requires-admin-action>
+      <adm:server-restart />
+    </adm:requires-admin-action>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>700</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:string>
+        <adm:pattern>
+          <adm:regex>^7[0-7][0-7]$</adm:regex>
+          <adm:usage>MODE</adm:usage>
+          <adm:synopsis>
+            Any octal value between 700 and 777 (the owner must always
+            have read, write, and execute permissions on the directory).
+          </adm:synopsis>
+        </adm:pattern>
+      </adm:string>
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-db-directory-permissions</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="db-cache-percent">
+    <adm:synopsis>
+      Specifies the percentage of JVM memory to allocate to the database cache.
+    </adm:synopsis>
+    <adm:description>
+      Specifies the percentage of memory available to the JVM that
+      should be used for caching database contents. Note that this is
+      only used if the value of the db-cache-size property is set to
+      "0 MB". Otherwise, the value of that property is used instead
+      to control the cache size configuration.
+    </adm:description>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>50</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:integer lower-limit="1" upper-limit="90" />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-db-cache-percent</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="db-cache-size">
+    <adm:synopsis>
+      The amount of JVM memory to allocate to the database cache.
+    </adm:synopsis>
+    <adm:description>
+      Specifies the amount of memory that should be used for caching
+      database contents. A value of "0 MB" indicates that the
+      db-cache-percent property should be used instead to specify the
+      cache size.
+    </adm:description>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>0 MB</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:size lower-limit="0 MB" />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-db-cache-size</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="db-txn-no-sync" advanced="true">
+    <adm:synopsis>
+      Indicates whether database writes should be primarily written to
+      an internal buffer but not immediately written to disk.
+    </adm:synopsis>
+    <adm:description>
+      Setting the value of this configuration attribute to "true" may
+      improve write performance but could cause the most
+      recent changes to be lost if the <adm:product-name /> directory server or the
+      underlying JVM exits abnormally, or if an OS or hardware failure
+      occurs (a behavior similar to running with transaction durability
+      disabled in the Sun Java System Directory Server).
+    </adm:description>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>false</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:boolean />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-db-txn-no-sync</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="disk-low-threshold" advanced="true">
+      <adm:synopsis>
+        Low disk threshold to limit database updates
+      </adm:synopsis>
+      <adm:description>
+        Specifies the "low" free space on the disk. When the available
+        free space on the disk used by this database instance falls below the
+        value specified, protocol updates on this database are permitted only
+        by a user with the BYPASS_LOCKDOWN privilege.
+      </adm:description>
+      <adm:default-behavior>
+          <adm:defined>
+              <adm:value>200 megabytes</adm:value>
+          </adm:defined>
+      </adm:default-behavior>
+      <adm:syntax>
+          <adm:size lower-limit="0" />
+      </adm:syntax>
+      <adm:profile name="ldap">
+          <ldap:attribute>
+              <ldap:name>ds-cfg-disk-low-threshold</ldap:name>
+          </ldap:attribute>
+      </adm:profile>
+  </adm:property>
+  <adm:property name="disk-full-threshold" advanced="true">
+      <adm:synopsis>
+        Full disk threshold to limit database updates
+      </adm:synopsis>
+      <adm:description>
+        When the available free space on the disk used by this database
+        instance falls below the value specified, no updates
+        are permitted and the server returns an UNWILLING_TO_PERFORM error.
+        Updates are allowed again as soon as free space rises above the
+        threshold.
+      </adm:description>
+      <adm:default-behavior>
+          <adm:defined>
+              <adm:value>100 megabytes</adm:value>
+          </adm:defined>
+      </adm:default-behavior>
+      <adm:syntax>
+          <adm:size lower-limit="0" />
+      </adm:syntax>
+      <adm:profile name="ldap">
+          <ldap:attribute>
+              <ldap:name>ds-cfg-disk-full-threshold</ldap:name>
+          </ldap:attribute>
+      </adm:profile>
+  </adm:property>
+</adm:managed-object>
diff --git a/opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml b/opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml
new file mode 100644
index 0000000..882f836
--- /dev/null
+++ b/opendj-sdk/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml
@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ! CDDL HEADER START
+  !
+  ! The contents of this file are subject to the terms of the
+  ! Common Development and Distribution License, Version 1.0 only
+  ! (the "License").  You may not use this file except in compliance
+  ! with the License.
+  !
+  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
+  ! or http://forgerock.org/license/CDDLv1.0.html.
+  ! See the License for the specific language governing permissions
+  ! and limitations under the License.
+  !
+  ! When distributing Covered Code, include this CDDL HEADER in each
+  ! file and include the License file at legal-notices/CDDLv1_0.txt.
+  ! If applicable, add the following below this CDDL HEADER, with the
+  ! fields enclosed by brackets "[]" replaced with your own identifying
+  ! information:
+  !      Portions Copyright [yyyy] [name of copyright owner]
+  !
+  ! CDDL HEADER END
+  !
+  !
+  !      Copyright 2014 ForgeRock AS.
+  ! -->
+<adm:managed-object abstract="true" name="pluggable-backend"
+  plural-name="pluggable-backends" package="org.forgerock.opendj.server.config"
+  extends="backend" xmlns:adm="http://opendj.forgerock.org/admin"
+  xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+  xmlns:cli="http://opendj.forgerock.org/admin-cli">
+  <adm:synopsis>
+    A <adm:user-friendly-name/> stores application
+    data in a pluggable database.
+  </adm:synopsis>
+  <adm:profile name="ldap">
+    <ldap:object-class>
+      <ldap:name>ds-cfg-pluggable-backend</ldap:name>
+      <ldap:superior>ds-cfg-backend</ldap:superior>
+    </ldap:object-class>
+  </adm:profile>
+  <adm:relation name="backend-index" managed-object-name="local-db-index">
+    <adm:one-to-many naming-property="attribute" plural-name="backend-indexes">
+      <adm:default-managed-object name="aci">
+        <adm:property name="index-type">
+          <adm:value>presence</adm:value>
+        </adm:property>
+        <adm:property name="attribute">
+          <adm:value>aci</adm:value>
+        </adm:property>
+      </adm:default-managed-object>
+      <adm:default-managed-object name="entryUUID">
+        <adm:property name="index-type">
+          <adm:value>equality</adm:value>
+        </adm:property>
+        <adm:property name="attribute">
+          <adm:value>entryUUID</adm:value>
+        </adm:property>
+      </adm:default-managed-object>
+      <adm:default-managed-object name="objectClass">
+        <adm:property name="index-type">
+          <adm:value>equality</adm:value>
+        </adm:property>
+        <adm:property name="attribute">
+          <adm:value>objectClass</adm:value>
+        </adm:property>
+      </adm:default-managed-object>
+      <adm:default-managed-object name="ds-sync-hist">
+        <adm:property name="index-type">
+          <adm:value>ordering</adm:value>
+        </adm:property>
+        <adm:property name="attribute">
+          <adm:value>ds-sync-hist</adm:value>
+        </adm:property>
+      </adm:default-managed-object>
+      <adm:default-managed-object name="ds-sync-conflict">
+        <adm:property name="index-type">
+          <adm:value>equality</adm:value>
+        </adm:property>
+        <adm:property name="attribute">
+          <adm:value>ds-sync-conflict</adm:value>
+        </adm:property>
+      </adm:default-managed-object>
+    </adm:one-to-many>
+    <adm:profile name="ldap">
+      <ldap:rdn-sequence>cn=Index</ldap:rdn-sequence>
+    </adm:profile>
+    <adm:profile name="cli">
+      <cli:relation>
+        <cli:default-property name="index-type" />
+        <cli:default-property name="index-entry-limit" />
+        <cli:default-property name="index-extensible-matching-rule" />
+      </cli:relation>
+    </adm:profile>
+  </adm:relation>
+  <adm:relation name="backend-vlv-index" managed-object-name="local-db-vlv-index">
+    <adm:one-to-many naming-property="name" plural-name="backend-vlv-indexes"/>
+    <adm:profile name="ldap">
+      <ldap:rdn-sequence>cn=VLV Index</ldap:rdn-sequence>
+    </adm:profile>
+    <adm:profile name="cli">
+      <cli:relation>
+        <cli:default-property name="base-dn" />
+        <cli:default-property name="scope" />
+        <cli:default-property name="filter" />
+        <cli:default-property name="sort-order" />
+      </cli:relation>
+    </adm:profile>
+  </adm:relation>
+  <adm:property-override name="writability-mode">
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>enabled</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+  </adm:property-override>
+  <adm:property name="compact-encoding">
+    <adm:synopsis>
+      Indicates whether the backend should use a compact form when
+      encoding entries by compressing the attribute descriptions and
+      object class sets.
+    </adm:synopsis>
+    <adm:description>
+      Note that this property applies only to the entries themselves and
+      does not impact the index data.
+    </adm:description>
+    <adm:requires-admin-action>
+      <adm:none>
+        <adm:synopsis>
+          Changes to this setting take effect only for writes that
+          occur after the change is made. It is not retroactively
+          applied to existing data.
+        </adm:synopsis>
+      </adm:none>
+    </adm:requires-admin-action>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>true</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:boolean />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-compact-encoding</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="entries-compressed" advanced="true">
+    <adm:synopsis>
+      Indicates whether the backend should attempt to compress entries
+      before storing them in the database.
+    </adm:synopsis>
+    <adm:description>
+      Note that this property applies only to the entries themselves and
+      does not impact the index data. Further, the effectiveness of the
+      compression is based on the type of data contained in the
+      entry.
+    </adm:description>
+    <adm:requires-admin-action>
+      <adm:none>
+        <adm:synopsis>
+          Changes to this setting take effect only for writes that
+          occur after the change is made. It is not retroactively
+          applied to existing data.
+        </adm:synopsis>
+      </adm:none>
+    </adm:requires-admin-action>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>false</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:boolean />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-entries-compressed</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="index-entry-limit">
+    <adm:synopsis>
+      Specifies the maximum number of entries that is allowed to
+      match a given index key before that particular index key is no
+      longer maintained.
+    </adm:synopsis>
+    <adm:description>
+      This property is analogous to the ALL IDs threshold in the Sun
+      Java System Directory Server. Note that this is the default limit
+      for the backend, and it may be overridden on a per-attribute
+      basis.A value of 0 means there is no limit.
+    </adm:description>
+    <adm:requires-admin-action>
+      <adm:none>
+        <adm:synopsis>
+          If any index keys have already reached this limit, indexes
+          need to be rebuilt before they are allowed to use the
+          new limit.
+        </adm:synopsis>
+      </adm:none>
+    </adm:requires-admin-action>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>4000</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:integer lower-limit="0" upper-limit="2147483647" />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-index-entry-limit</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="preload-time-limit" advanced="true">
+    <adm:synopsis>
+      Specifies the length of time that the backend is allowed to
+      spend "pre-loading" data when it is initialized.
+    </adm:synopsis>
+    <adm:description>
+      The pre-load process is used to pre-populate the database
+      cache, so that it can be more quickly available when the server is
+      processing requests. A duration of zero means there is no
+      pre-load.
+    </adm:description>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>0s</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:duration base-unit="ms" lower-limit="0" upper-limit="2147483647" />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-preload-time-limit</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="index-filter-analyzer-enabled" advanced="true">
+    <adm:synopsis>
+      Indicates whether to gather statistical information about the search
+        filters processed by the directory server while evaluating the usage of
+        indexes.
+    </adm:synopsis>
+    <adm:description>
+      Analyzing indexes requires gathering search filter usage patterns from
+        user requests, especially for values as specified in the filters and
+        subsequently looking the status of those values into the index files.
+        When a search requests is processed, internal or user generated, a
+        first phase uses indexes to find potential entries to be returned.
+        Depending on the search filter, if the index of one of the specified
+        attributes matches too many entries (exceeds the index entry limit),
+        the search becomes non-indexed. In any case, all entries thus
+        gathered (or the entire DIT) are matched against the filter for
+        actually returning the search result.
+    </adm:description>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>false</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:boolean />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-index-filter-analyzer-enabled</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="index-filter-analyzer-max-filters" advanced="true">
+    <adm:synopsis>
+      The maximum number of search filter statistics to keep.
+    </adm:synopsis>
+    <adm:description>
+      When the maximum number of search filter is reached, the least used one
+      will be deleted.
+    </adm:description>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>25</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:integer lower-limit="1" />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-index-filter-analyzer-max-filters</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+  <adm:property name="subordinate-indexes-enabled" advanced="true">
+    <adm:synopsis>
+      Indicates whether id2children and id2subtree indexes should be used for
+      this backend. These indexes are used for constraining filtered searches
+      to the search request's scope as well as for generating values for the
+      hasSubordinates and numSubordinates virtual attributes.
+    </adm:synopsis>
+    <adm:description>
+      Subordinate indexing is enabled by default and should only be disabled
+      for specialized use cases. A typical use case is where the backend is
+      to be subjected to heavy add/delete load beneath the same parent entry
+      such as when used as a session database. Disabling the subordinate
+      indexes means that the numSubordinates and hasSubordinates virtual
+      attributes will not be supported.
+    </adm:description>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>true</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:boolean />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-subordinate-indexes-enabled</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+</adm:managed-object>
diff --git a/opendj-sdk/opendj-server3x-adapter/src/test/resources/config/schema/02-config.ldif b/opendj-sdk/opendj-server3x-adapter/src/test/resources/config/schema/02-config.ldif
index f75575d..3cdbe64 100644
--- a/opendj-sdk/opendj-server3x-adapter/src/test/resources/config/schema/02-config.ldif
+++ b/opendj-sdk/opendj-server3x-adapter/src/test/resources/config/schema/02-config.ldif
@@ -5750,3 +5750,28 @@
   SUP ds-cfg-password-storage-scheme
   STRUCTURAL
   X-ORIGIN 'OpenDJ Directory Server' )
+objectClasses: ( 1.3.6.1.4.1.36733.2.1.2.22
+  NAME 'ds-cfg-pluggable-backend'
+  SUP ds-cfg-backend
+  STRUCTURAL
+  MAY ( ds-cfg-index-entry-limit $
+        ds-cfg-preload-time-limit $
+        ds-cfg-entries-compressed $
+        ds-cfg-compact-encoding $
+        ds-cfg-index-filter-analyzer-enabled $
+        ds-cfg-index-filter-analyzer-max-filters $
+        ds-cfg-subordinate-indexes-enabled )
+  X-ORIGIN 'OpenDJ Directory Server' )
+objectClasses: ( 1.3.6.1.4.1.36733.2.1.2.23
+  NAME 'ds-cfg-persistit-backend'
+  SUP ds-cfg-pluggable-backend
+  STRUCTURAL
+  MUST ds-cfg-db-directory
+  MAY ( ds-cfg-db-directory-permissions $
+        ds-cfg-db-cache-percent $
+        ds-cfg-db-cache-size $
+        ds-cfg-db-txn-no-sync $
+        ds-cfg-disk-full-threshold $
+        ds-cfg-disk-low-threshold )
+  X-ORIGIN 'OpenDJ Directory Server' )
+

--
Gitblit v1.10.0