From d51eba690902925cd89024bef2800e2232123da6 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 19 Aug 2013 10:32:47 +0000
Subject: [PATCH] Enforced ReplicationServerDomain responsibilities by increasing encapsulation.
---
opends/src/server/org/opends/server/replication/server/DataServerHandler.java | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/DataServerHandler.java b/opends/src/server/org/opends/server/replication/server/DataServerHandler.java
index 8ec6405..4b25380 100644
--- a/opends/src/server/org/opends/server/replication/server/DataServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/DataServerHandler.java
@@ -229,14 +229,6 @@
return newStatus;
}
- private void createStatusAnalyzer()
- {
- if (!replicationServerDomain.isRunningStatusAnalyzer())
- {
- replicationServerDomain.startStatusAnalyzer();
- }
- }
-
/**
* Retrieves a set of attributes containing monitor data that should be
* returned to the client if the corresponding monitor entry is requested.
@@ -457,8 +449,7 @@
localGenerationId = replicationServerDomain.getGenerationId();
oldGenerationId = localGenerationId;
- // Duplicate server ?
- if (!replicationServerDomain.checkForDuplicateDS(this))
+ if (replicationServerDomain.isAlreadyConnectedToDS(this))
{
abortStart(null);
return;
@@ -468,7 +459,6 @@
{
StartMsg outStartMsg = sendStartToRemote();
- // log
logStartHandshakeRCVandSND(inServerStartMsg, outStartMsg);
// The session initiator decides whether to use SSL.
@@ -508,11 +498,8 @@
throw new DirectoryException(ResultCode.OTHER, null, null);
}
- // Create the status analyzer for the domain if not already started
- createStatusAnalyzer();
-
- // Create the monitoring publisher for the domain if not already started
- createMonitoringPublisher();
+ replicationServerDomain.startStatusAnalyzer();
+ replicationServerDomain.startMonitoringPublisher();
registerIntoDomain();
--
Gitblit v1.10.0