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/protocol/ProtocolVersion.java | 35 +++++++++--------------------------
1 files changed, 9 insertions(+), 26 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/ProtocolVersion.java b/opends/src/server/org/opends/server/replication/protocol/ProtocolVersion.java
index 97f4b1c..377fea2 100644
--- a/opends/src/server/org/opends/server/replication/protocol/ProtocolVersion.java
+++ b/opends/src/server/org/opends/server/replication/protocol/ProtocolVersion.java
@@ -75,14 +75,15 @@
public static final short REPLICATION_PROTOCOL_V5 = 5;
/**
+ * The constant for the 6th version of the replication protocol.
+ * - include DS local URL in the DSInfo of TopologyMsg.
+ */
+ public static final short REPLICATION_PROTOCOL_V6 = 6;
+
+ /**
* The replication protocol version used by the instance of RS/DS in this VM.
*/
- private static short currentVersion = -1;
-
- static
- {
- resetCurrentVersion();
- }
+ private static final short CURRENT_VERSION = REPLICATION_PROTOCOL_V6;
/**
* Gets the current version of the replication protocol.
@@ -91,25 +92,7 @@
*/
public static short getCurrentVersion()
{
- return currentVersion;
- }
-
- /**
- * For test purpose.
- * @param curVersion The provided current version.
- */
- public static void setCurrentVersion(short curVersion)
- {
- currentVersion = curVersion;
- }
-
- /**
- * Resets the protocol version to the default value (the latest version).
- * For test purpose.
- */
- public static void resetCurrentVersion()
- {
- currentVersion = REPLICATION_PROTOCOL_V5;
+ return CURRENT_VERSION;
}
/**
@@ -121,7 +104,7 @@
*/
public static short minWithCurrent(short version)
{
- return (version < currentVersion ? version : currentVersion);
+ return (version < CURRENT_VERSION ? version : CURRENT_VERSION);
}
}
--
Gitblit v1.10.0