From c02dd7f87e9ba574f06e5cc1eb36ebeb76b9f446 Mon Sep 17 00:00:00 2001
From: mrossign <mrossign@localhost>
Date: Thu, 08 Oct 2009 16:02:17 +0000
Subject: [PATCH] - Addition of ReplServerStartDSMsg now sent to a DS connecting to a RS in handshake phase instead of a ReplServerStartMsg. ReplServerStartDSMsg contains same thing as ReplServerStartMsg but also contains
---
opendj-sdk/opends/src/server/org/opends/server/replication/protocol/MonitorMsg.java | 34 +++++++++++-----------------------
1 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/MonitorMsg.java b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/MonitorMsg.java
index 7b7e01d..e3f6e48 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/MonitorMsg.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/MonitorMsg.java
@@ -82,11 +82,6 @@
SubTopoMonitorData data = new SubTopoMonitorData();
/**
- * The protocolVersion that should be used when serializing this message.
- */
- private final short protocolVersion;
-
- /**
* Creates a new MonitorMsg.
*
* @param sender The sender of this message.
@@ -95,25 +90,8 @@
public MonitorMsg(int sender, int destination)
{
super(sender, destination);
- protocolVersion = ProtocolVersion.getCurrentVersion();
}
-
- /**
- * Creates a new MonitorMsg with a specific protocol version.
- *
- * @param sender The sender of this message.
- * @param destination The destination of this message.
- * @param replicationProtocol The protocol version to use.
- */
- public MonitorMsg(int sender, int destination,
- short replicationProtocol)
- {
- super(sender, destination);
- protocolVersion = replicationProtocol;
- }
-
-
/**
* Sets the state of the replication server.
* @param state The state.
@@ -204,7 +182,6 @@
*/
public MonitorMsg(byte[] in, short version) throws DataFormatException
{
- protocolVersion = ProtocolVersion.getCurrentVersion();
ByteSequenceReader reader = ByteString.wrap(in).asReader();
if (version == ProtocolVersion.REPLICATION_PROTOCOL_V1)
@@ -328,6 +305,17 @@
*/
@Override
public byte[] getBytes()
+ throws UnsupportedEncodingException
+ {
+ return getBytes(ProtocolVersion.getCurrentVersion());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public byte[] getBytes(short protocolVersion)
+ throws UnsupportedEncodingException
{
try
{
--
Gitblit v1.10.0