From e546352d03f0263efe6cfa514d896ee1c7044eea Mon Sep 17 00:00:00 2001
From: abobrov <abobrov@localhost>
Date: Tue, 22 Jan 2008 15:50:28 +0000
Subject: [PATCH] - rename and move [entry-]cache-preload from default entry cache configuration to global configuration. - abandon default entry cache configuration and objectclass which can be resurrected later if more related configuration attributes come in. - minor cleanup to preload messages.
---
opends/resource/schema/02-config.ldif | 11 +--
/dev/null | 69 -----------------------
opends/src/server/org/opends/server/core/EntryCacheConfigManager.java | 2
opends/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml | 11 ---
opends/resource/config/config.ldif | 2
opends/src/messages/messages/extension.properties | 6 +-
opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml | 21 +++++++
7 files changed, 29 insertions(+), 93 deletions(-)
diff --git a/opends/resource/config/config.ldif b/opends/resource/config/config.ldif
index 4284459..e992831 100644
--- a/opends/resource/config/config.ldif
+++ b/opends/resource/config/config.ldif
@@ -50,6 +50,7 @@
ds-cfg-idle-time-limit: 0 seconds
ds-cfg-save-config-on-successful-startup: true
ds-cfg-etime-resolution: milliseconds
+ds-cfg-entry-cache-preload: false
ds-cfg-allowed-task: org.opends.server.tasks.AddSchemaFileTask
ds-cfg-allowed-task: org.opends.server.tasks.BackupTask
ds-cfg-allowed-task: org.opends.server.tasks.DisconnectClientTask
@@ -491,7 +492,6 @@
dn: cn=Entry Caches,cn=config
objectClass: top
objectClass: ds-cfg-branch
-objectClass: ds-cfg-default-entry-cache
cn: Entry Caches
dn: cn=FIFO,cn=Entry Caches,cn=config
diff --git a/opends/resource/schema/02-config.ldif b/opends/resource/schema/02-config.ldif
index 8bf2a14..b4136c3 100644
--- a/opends/resource/schema/02-config.ldif
+++ b/opends/resource/schema/02-config.ldif
@@ -2183,7 +2183,7 @@
SINGLE-VALUE
X-ORIGIN 'OpenDS Directory Server' )
attributeTypes: ( 1.3.6.1.4.1.26027.1.1.446
- NAME 'ds-cfg-cache-preload'
+ NAME 'ds-cfg-entry-cache-preload'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE
X-ORIGIN 'OpenDS Directory Server' )
@@ -2592,7 +2592,8 @@
ds-cfg-idle-time-limit $
ds-cfg-workflow-configuration-mode $
ds-cfg-save-config-on-successful-startup $
- ds-cfg-etime-resolution )
+ ds-cfg-etime-resolution $
+ ds-cfg-entry-cache-preload )
X-ORIGIN 'OpenDS Directory Server' )
objectClasses: ( 1.3.6.1.4.1.26027.1.2.40
NAME 'ds-cfg-root-dn-user'
@@ -3693,9 +3694,3 @@
STRUCTURAL
MUST ( ds-cfg-backend )
X-ORIGIN 'OpenDS Directory Server' )
-objectClasses: ( 1.3.6.1.4.1.26027.1.2.180
- NAME 'ds-cfg-default-entry-cache'
- SUP ds-cfg-branch
- STRUCTURAL
- MAY ds-cfg-cache-preload
- X-ORIGIN 'OpenDS Directory Server' )
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/DefaultEntryCacheConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/DefaultEntryCacheConfiguration.xml
deleted file mode 100644
index 24d568d..0000000
--- a/opends/src/admin/defn/org/opends/server/admin/std/DefaultEntryCacheConfiguration.xml
+++ /dev/null
@@ -1,69 +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
- ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
- ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- ! 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
- ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. 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
- !
- !
- ! Portions Copyright 2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="default-entry-cache" plural-name="default-entry-cache"
- package="org.opends.server.admin.std"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-name />
- represents the Directory Server entry cache framework.
- </adm:synopsis>
- <adm:tag name="database" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-default-entry-cache</ldap:name>
- <ldap:superior>ds-cfg-branch</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="cache-preload" mandatory="false">
- <adm:synopsis>
- Indicates whether or not to preload the entry cache on startup.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:server-restart />
- </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-cache-preload</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
-</adm:managed-object>
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml
index 161db58..71019a1 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml
@@ -810,4 +810,25 @@
</ldap:attribute>
</adm:profile>
</adm:property>
+ <adm:property name="entry-cache-preload" mandatory="false">
+ <adm:synopsis>
+ Indicates whether or not to preload the entry cache on startup.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </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-entry-cache-preload</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
</adm:managed-object>
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml
index 67334c8..8187820 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml
@@ -203,17 +203,6 @@
</cli:relation>
</adm:profile>
</adm:relation>
- <adm:relation name="default-entry-cache">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Entry Caches,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="cache-preload" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
<adm:relation name="entry-cache">
<adm:one-to-many />
<adm:profile name="ldap">
diff --git a/opends/src/messages/messages/extension.properties b/opends/src/messages/messages/extension.properties
index 12eaff6..f024d0a 100644
--- a/opends/src/messages/messages/extension.properties
+++ b/opends/src/messages/messages/extension.properties
@@ -80,12 +80,12 @@
SEVERE_WARN_CACHE_PRELOAD_INTERRUPTED_13=The entry cache preload has been \
interrupted
SEVERE_ERR_CACHE_PRELOAD_COLLECTOR_FAILED_14=The entry cache preload was \
- unable to complete collector processing for %s backend, and as a result \
+ unable to complete preload processing for %s backend, and as a result \
the entry cache preload for this backend will be incomplete
SEVERE_WARN_CACHE_PRELOAD_BACKEND_FAILED_15=The entry cache preload is not \
supported by %s backend, and as a result no entries from this backend will \
- be preloaded onto the entry cache
-SEVERE_ERR_CACHE_PRELOAD_ENTRY_FAILED_16=Failed to preload %s entry onto \
+ be preloaded into the entry cache
+SEVERE_ERR_CACHE_PRELOAD_ENTRY_FAILED_16=Failed to preload %s entry into \
the entry cache: %s
MILD_ERR_EXTOP_PASSMOD_ILLEGAL_REQUEST_ELEMENT_TYPE_32=The password modify \
extended request sequence included an ASN.1 element of an invalid type: %s
diff --git a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
index 5f87b9e..cde7a0e 100644
--- a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
+++ b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
@@ -228,7 +228,7 @@
}
// If requested preload the entry cache.
- if (rootConfiguration.getDefaultEntryCache().isCachePreload()) {
+ if (rootConfiguration.getGlobalConfiguration().isEntryCachePreload()) {
// Kick off preload arbiter main thread.
EntryCachePreloader preloadThread = new EntryCachePreloader();
preloadThread.start();
--
Gitblit v1.10.0