From aa2e7c321ca330792a6c2a7c41efd923bb1270af Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Tue, 04 Jun 2013 14:15:10 +0000
Subject: [PATCH] Initial work for re-opened OPENDJ-866: Local RS is named differently to remote RS under.
---
opends/src/server/org/opends/server/core/EntryCacheConfigManager.java | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
index 12884c0..80d5a71 100644
--- a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
+++ b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2008 Sun Microsystems, Inc.
+ * Portions copyright 2013 ForgeRock AS.
*/
package org.opends.server.core;
import org.opends.messages.Message;
@@ -342,8 +343,7 @@
EntryCacheMonitorProvider monitor = entryCache.getEntryCacheMonitor();
if (monitor != null)
{
- String instanceName = toLowerCase(monitor.getMonitorInstanceName());
- DirectoryServer.deregisterMonitorProvider(instanceName);
+ DirectoryServer.deregisterMonitorProvider(monitor);
monitor.finalizeMonitorProvider();
entryCache.setEntryCacheMonitor(null);
}
@@ -511,8 +511,7 @@
EntryCacheMonitorProvider monitor = entryCache.getEntryCacheMonitor();
if (monitor != null)
{
- String instanceName = toLowerCase(monitor.getMonitorInstanceName());
- DirectoryServer.deregisterMonitorProvider(instanceName);
+ DirectoryServer.deregisterMonitorProvider(monitor);
monitor.finalizeMonitorProvider();
entryCache.setEntryCacheMonitor(null);
}
@@ -612,7 +611,7 @@
)
throws InitializationException
{
- EntryCache entryCache = null;
+ EntryCache<?> entryCache = null;
// If we this entry cache is already installed and active it
// should be present in the current cache order map, use it.
@@ -622,17 +621,17 @@
try
{
- EntryCacheCfgDefn definition;
- ClassPropertyDefinition propertyDefinition;
- Class<? extends EntryCache> cacheClass;
- EntryCache<? extends EntryCacheCfg> cache;
-
- definition = EntryCacheCfgDefn.getInstance();
- propertyDefinition = definition.getJavaClassPropertyDefinition();
- cacheClass = propertyDefinition.loadClass(className, EntryCache.class);
+ EntryCacheCfgDefn definition = EntryCacheCfgDefn.getInstance();
+ ClassPropertyDefinition propertyDefinition = definition
+ .getJavaClassPropertyDefinition();
+ @SuppressWarnings("unchecked")
+ Class<? extends EntryCache<?>> cacheClass =
+ (Class<? extends EntryCache<?>>) propertyDefinition
+ .loadClass(className, EntryCache.class);
// If there is some entry cache instance already initialized work with
// it instead of creating a new one unless explicit init is requested.
+ EntryCache<? extends EntryCacheCfg> cache;
if (initialize || (entryCache == null)) {
cache = (EntryCache<? extends EntryCacheCfg>) cacheClass.newInstance();
} else {
--
Gitblit v1.10.0