From 4cca8e97f18e39834d50177899b5f5ac2ebaeed2 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 27 Aug 2014 08:29:16 +0000
Subject: [PATCH] OPENDJ-1206 (CR-4368) Create a new ReplicationBackend/ChangelogBackend to support cn=changelog
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 105 +++++++---------------------------------------------
1 files changed, 15 insertions(+), 90 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index ae19c74..3d20d87 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -26,19 +26,6 @@
*/
package org.opends.server.core;
-import static org.opends.messages.ConfigMessages.*;
-import static org.opends.messages.CoreMessages.*;
-import static org.opends.messages.ToolMessages.*;
-import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.AccessLogger.*;
-import static org.opends.server.loggers.ErrorLogger.*;
-import static org.opends.server.loggers.debug.DebugLogger.*;
-import static org.opends.server.schema.SchemaConstants.*;
-import static org.opends.server.util.DynamicConstants.*;
-import static org.opends.server.util.ServerConstants.*;
-import static org.opends.server.util.StaticUtils.*;
-import static org.opends.server.util.Validator.*;
-
import java.io.*;
import java.lang.management.ManagementFactory;
import java.net.InetAddress;
@@ -94,6 +81,19 @@
import org.opends.server.workflowelement.WorkflowElementConfigManager;
import org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement;
+import static org.opends.messages.ConfigMessages.*;
+import static org.opends.messages.CoreMessages.*;
+import static org.opends.messages.ToolMessages.*;
+import static org.opends.server.config.ConfigConstants.*;
+import static org.opends.server.loggers.AccessLogger.*;
+import static org.opends.server.loggers.ErrorLogger.*;
+import static org.opends.server.loggers.debug.DebugLogger.*;
+import static org.opends.server.schema.SchemaConstants.*;
+import static org.opends.server.util.DynamicConstants.*;
+import static org.opends.server.util.ServerConstants.*;
+import static org.opends.server.util.StaticUtils.*;
+import static org.opends.server.util.Validator.*;
+
/**
* This class defines the core of the Directory Server. It manages the startup
* and shutdown processes and coordinates activities between all other
@@ -405,13 +405,6 @@
/** The set of backup task listeners registered with the Directory Server. */
private CopyOnWriteArrayList<BackupTaskListener> backupTaskListeners;
- /**
- * The set of change notification listeners registered with the Directory
- * Server.
- */
- private List<ChangeNotificationListener>
- changeNotificationListeners;
-
/** The set of connection handlers registered with the Directory Server. */
private List<ConnectionHandler> connectionHandlers;
@@ -922,8 +915,6 @@
directoryServer.backendInitializationListeners =
new CopyOnWriteArraySet<BackendInitializationListener>();
directoryServer.baseDnRegistry = new BaseDnRegistry();
- directoryServer.changeNotificationListeners =
- new CopyOnWriteArrayList<ChangeNotificationListener>();
directoryServer.initializationCompletedListeners =
new CopyOnWriteArrayList<InitializationCompletedListener>();
directoryServer.shutdownListeners =
@@ -941,7 +932,6 @@
new ConcurrentHashMap<String,ExtendedOperationHandler>();
directoryServer.saslMechanismHandlers =
new ConcurrentHashMap<String,SASLMechanismHandler>();
- directoryServer.authenticatedUsers = new AuthenticatedUsers();
directoryServer.offlineSchemaChanges = new LinkedList<Modification>();
directoryServer.backupTaskListeners =
new CopyOnWriteArrayList<BackupTaskListener>();
@@ -1378,23 +1368,15 @@
certificateMapperConfigManager.initializeCertificateMappers();
- // Initialize the identity mappers.
initializeIdentityMappers();
-
- // Initialize the root DNs.
rootDNConfigManager = new RootDNConfigManager();
rootDNConfigManager.initializeRootDNs();
-
- // Initialize the subentry manager.
+ directoryServer.authenticatedUsers = new AuthenticatedUsers();
+ // initialize both subentry manager and group manager for this backend.
initializeSubentryManager();
-
- // Initialize the group manager.
initializeGroupManager();
-
- // Now we can initialize both subentry manager and group manager
- // for this backend.
subentryManager.performBackendInitializationProcessing(configHandler);
groupManager.performBackendInitializationProcessing(configHandler);
@@ -1424,14 +1406,9 @@
// Reset the map as we can no longer guarantee offline state.
directoryServer.offlineBackendsStateIDs.clear();
- // Initialize all the extended operation handlers.
initializeExtendedOperations();
-
-
- // Initialize all the SASL mechanism handlers.
initializeSASLMechanisms();
-
// Initialize all the connection handlers
// (including the administration connector).
if (startConnectionHandlers)
@@ -1439,13 +1416,9 @@
initializeConnectionHandlers();
}
-
- // Initialize all the monitor providers.
monitorConfigManager = new MonitorConfigManager();
monitorConfigManager.initializeMonitorProviders();
-
- // Initialize all the authentication policy components.
initializeAuthenticationPolicyComponents();
@@ -7155,54 +7128,6 @@
return directoryServer.workQueue.trySubmitOperation(operation);
}
-
- /**
- * Retrieves the set of change notification listeners registered with the
- * Directory Server.
- *
- * @return The set of change notification listeners registered with the
- * Directory Server.
- */
- public static List<ChangeNotificationListener>
- getChangeNotificationListeners()
- {
- return directoryServer.changeNotificationListeners;
- }
-
-
-
- /**
- * Registers the provided change notification listener with the Directory
- * Server so that it will be notified of any add, delete, modify, or modify DN
- * operations that are performed.
- *
- * @param changeListener The change notification listener to register with
- * the Directory Server.
- */
- public static void registerChangeNotificationListener(
- ChangeNotificationListener changeListener)
- {
- directoryServer.changeNotificationListeners.add(changeListener);
- }
-
-
-
- /**
- * Deregisters the provided change notification listener with the Directory
- * Server so that it will no longer be notified of any add, delete, modify, or
- * modify DN operations that are performed.
- *
- * @param changeListener The change notification listener to deregister with
- * the Directory Server.
- */
- public static void deregisterChangeNotificationListener(
- ChangeNotificationListener changeListener)
- {
- directoryServer.changeNotificationListeners.remove(changeListener);
- }
-
-
-
/**
* Retrieves the set of synchronization providers that have been registered
* with the Directory Server.
--
Gitblit v1.10.0