From 4255726566abd4387c586d09376ffd4efeb5f164 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Tue, 08 Apr 2014 09:09:25 +0000
Subject: [PATCH] Backport fix for OPENDJ-1354: replication threads BLOCKED in pendingChanges queue
---
opendj-sdk/opends/src/server/org/opends/server/replication/protocol/MonitorMsg.java | 67 ++++++++++++++++++++++-----------
1 files changed, 44 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 9b55637..a25690c 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
@@ -22,7 +22,7 @@
*
*
* Copyright 2009 Sun Microsystems, Inc.
- * Portions Copyright 2013 ForgeRock AS.
+ * Portions Copyright 2013-2014 ForgeRock AS.
*/
package org.opends.server.replication.protocol;
@@ -50,12 +50,24 @@
* When RS2 receives a MonitorRequestMessage from RS1, RS2 responds with a
* MonitorMsg.
*/
-public class MonitorMsg extends RoutableMsg
+public class MonitorMsg extends ReplicationMsg
{
/**
- * Data structure to manage the state and the approximation
- * of the data of the first missing change for each LDAP server
- * connected to a Replication Server.
+ * The destination server or servers of this message.
+ */
+ private final int destination;
+
+ /**
+ * The serverID of the server that sends this message.
+ */
+ private final int senderID;
+
+
+
+ /**
+ * Data structure to manage the state and the approximation of the data of the
+ * first missing change for each LDAP server connected to a Replication
+ * Server.
*/
static class ServerData
{
@@ -89,24 +101,7 @@
*/
public MonitorMsg(int sender, int destination)
{
- super(sender, destination);
- }
-
- /**
- * Sets the sender ID.
- * @param senderID The sender ID.
- */
- public void setSenderID(int senderID)
- {
- this.senderID = senderID;
- }
-
- /**
- * Sets the destination.
- * @param destination The destination.
- */
- public void setDestination(int destination)
- {
+ this.senderID = sender;
this.destination = destination;
}
@@ -459,6 +454,32 @@
return data.rsStates.keySet().iterator();
}
+
+
+ /**
+ * Get the destination.
+ *
+ * @return the destination
+ */
+ public int getDestination()
+ {
+ return destination;
+ }
+
+
+
+ /**
+ * Get the server ID of the server that sent this message.
+ *
+ * @return the server id
+ */
+ public int getSenderID()
+ {
+ return senderID;
+ }
+
+
+
/**
* {@inheritDoc}
*/
--
Gitblit v1.10.0