From 07347aac048a14dc5fa1a5c1d02426230622051d Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 02 Aug 2013 13:26:30 +0000
Subject: [PATCH] serviceId => baseDN (To make the code less confusing)

---
 opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java b/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
index d3a3b84..cf57a0c 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
@@ -54,8 +54,8 @@
 public class ReplicationServerHandler extends ServerHandler
 {
 
-  /*
-   * Properties filled only if remote server is a RS
+  /**
+   * Properties filled only if remote server is a RS.
    */
   private String serverAddressURL;
   /**
@@ -87,7 +87,7 @@
       serverAddressURL =
         session.getRemoteAddress() + ":" + serverURL.substring(separator +
             1);
-      setServiceIdAndDomain(inReplServerStartMsg.getBaseDn(), false);
+      setBaseDNAndDomain(inReplServerStartMsg.getBaseDn(), false);
       setInitialServerState(inReplServerStartMsg.getServerState());
       setSendWindowSize(inReplServerStartMsg.getWindowSize());
       if (protocolVersion > ProtocolVersion.REPLICATION_PROTOCOL_V1)
@@ -117,7 +117,7 @@
   private ReplServerStartMsg sendStartToRemote() throws IOException
   {
     ReplServerStartMsg outReplServerStartMsg = new ReplServerStartMsg(
-        replicationServerId, replicationServerURL, getServiceId(),
+        replicationServerId, replicationServerURL, getBaseDN(),
         maxRcvWindow, replicationServerDomain.getDbServerState(),
         localGenerationId, sslEncryption,
         getLocalGroupId(), replicationServerDomain.getReplicationServer()
@@ -150,17 +150,17 @@
   /**
    * Connect the hosting RS to the RS represented by THIS handler
    * on an outgoing connection.
-   * @param serviceId The serviceId (usually baseDn).
+   * @param baseDN The baseDN
    * @param sslEncryption The sslEncryption requested to the remote RS.
    * @throws DirectoryException when an error occurs.
    */
-  public void connect(String serviceId, boolean sslEncryption)
+  public void connect(String baseDN, boolean sslEncryption)
   throws DirectoryException
   {
     // we are the initiator and decides of the encryption
     this.sslEncryption = sslEncryption;
 
-    setServiceIdAndDomain(serviceId, false);
+    setBaseDNAndDomain(baseDN, false);
 
     localGenerationId = replicationServerDomain.getGenerationId();
     oldGenerationId = localGenerationId;
@@ -315,7 +315,6 @@
    */
   public void startFromRemoteRS(ReplServerStartMsg inReplServerStartMsg)
   {
-    //
     localGenerationId = -1;
     oldGenerationId = -100;
     try
@@ -581,7 +580,7 @@
            */
           Message message = WARN_BAD_GENERATION_ID_FROM_RS.get(
                   serverId, session.getReadableRemoteAddress(), generationId,
-                  getServiceId(), getReplicationServerId(), localGenerationId);
+                  getBaseDN(), getReplicationServerId(), localGenerationId);
           logError(message);
         }
       }
@@ -767,8 +766,7 @@
     ArrayList<Attribute> attributes = super.getMonitorData();
 
     // Add the specific RS ones
-    attributes.add(Attributes.create("Replication-Server",
-        serverURL));
+    attributes.add(Attributes.create("Replication-Server", serverURL));
 
     MonitorData md = replicationServerDomain.getDomainMonitorData();
 

--
Gitblit v1.10.0