From 74023634617762408423a44c8dd01ee050fef584 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 03 Jun 2013 09:13:08 +0000
Subject: [PATCH] Fix OPENDJ-866 Local RS is named differently to remote RS under cn=replication,cn=monitor
---
opends/src/server/org/opends/server/replication/server/LightweightServerHandler.java | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/LightweightServerHandler.java b/opends/src/server/org/opends/server/replication/server/LightweightServerHandler.java
index 5e562f6..9a9e721 100644
--- a/opends/src/server/org/opends/server/replication/server/LightweightServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/LightweightServerHandler.java
@@ -73,6 +73,8 @@
// Server id of this DS
private int serverId = -1;
+ // Server URL of this DS
+ private String serverUrl = null;
// Generation id of this DS
private long generationId = -1;
// Group id of the DS;
@@ -103,6 +105,7 @@
* @param replicationServerId The serverId of the RS this remote DS is
* connected to
* @param serverId The serverId of this remote DS.
+ * @param serverUrl The serverUrl of this remote DS.
* @param generationId The generation id of this remote DS.
* @param groupId The group id of the remote DS
* @param status The id of the remote DS
@@ -116,15 +119,17 @@
* @param protocolVersion The protocol version supported by the remote DS.
*/
public LightweightServerHandler(ReplicationServerHandler replServerHandler,
- int replicationServerId, int serverId, long generationId, byte groupId,
- ServerStatus status, List<String> refUrls, boolean assuredFlag,
- AssuredMode assuredMode, byte safeDataLevel, Set<String> eclInclude,
- Set<String> eclIncludeForDeletes, short protocolVersion)
+ int replicationServerId, int serverId, String serverUrl,
+ long generationId, byte groupId, ServerStatus status,
+ List<String> refUrls, boolean assuredFlag, AssuredMode assuredMode,
+ byte safeDataLevel, Set<String> eclInclude,
+ Set<String> eclIncludeForDeletes, short protocolVersion)
{
this.replServerHandler = replServerHandler;
this.rsDomain = replServerHandler.getDomain();
this.replicationServerId = replicationServerId;
this.serverId = serverId;
+ this.serverUrl = serverUrl;
this.generationId = generationId;
this.groupId = groupId;
this.status = status;
@@ -151,7 +156,7 @@
*/
public DSInfo toDSInfo()
{
- return new DSInfo(serverId, replicationServerId, generationId,
+ return new DSInfo(serverId, serverUrl, replicationServerId, generationId,
status, assuredFlag, assuredMode, safeDataLevel, groupId, refUrls,
eclInclude, eclIncludeForDeletes, protocolVersion);
}
@@ -216,10 +221,8 @@
@Override
public String getMonitorInstanceName()
{
- String serverURL=""; // FIXME
- String str = serverURL + " " + String.valueOf(serverId);
- return "Undirect Replica " + str +
- ",cn=" + replServerHandler.getMonitorInstanceName();
+ return "Connected directory server DS(" + serverId + ") " + serverUrl
+ + ",cn=" + replServerHandler.getMonitorInstanceName();
}
/**
--
Gitblit v1.10.0