From a592fe71c4c2e29a136f9700a2981f3dcbd7e114 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 22 Sep 2014 19:47:33 +0000
Subject: [PATCH] OPENDJ-1205 (CR-4428) Remove network layer from External ChangeLog implementation
---
opendj3-server-dev/src/server/org/opends/server/replication/server/ServerHandler.java | 55 +++++++++++++------------------------------------------
1 files changed, 13 insertions(+), 42 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/replication/server/ServerHandler.java b/opendj3-server-dev/src/server/org/opends/server/replication/server/ServerHandler.java
index 3c664be..4912593 100644
--- a/opendj3-server-dev/src/server/org/opends/server/replication/server/ServerHandler.java
+++ b/opendj3-server-dev/src/server/org/opends/server/replication/server/ServerHandler.java
@@ -118,12 +118,12 @@
/**
* The associated ServerWriter that sends messages to the remote server.
*/
- protected ServerWriter writer;
+ private ServerWriter writer;
/**
* The associated ServerReader that receives messages from the remote server.
*/
- protected ServerReader reader;
+ private ServerReader reader;
// window
private int rcvWindow;
@@ -136,11 +136,11 @@
/**
* Semaphore that the writer uses to control the flow to the remote server.
*/
- protected Semaphore sendWindow;
+ private Semaphore sendWindow;
/**
* The initial size of the sending window.
*/
- protected int sendWindowSize;
+ private int sendWindowSize;
/**
* remote generation id.
*/
@@ -165,7 +165,7 @@
* The time in milliseconds between heartbeats from the replication
* server. Zero means heartbeats are off.
*/
- protected long heartbeatInterval = 0;
+ protected long heartbeatInterval;
/**
* The thread that will send heartbeats.
@@ -175,7 +175,7 @@
/**
* Set when ServerWriter is stopping.
*/
- protected volatile boolean shutdownWriter = false;
+ private volatile boolean shutdownWriter;
/**
* Weight of this remote server.
@@ -543,22 +543,16 @@
}
// Window stats
- attributes.add(Attributes.create("max-send-window", String
- .valueOf(sendWindowSize)));
- attributes.add(Attributes.create("current-send-window", String
- .valueOf(sendWindow.availablePermits())));
- attributes.add(Attributes.create("max-rcv-window", String
- .valueOf(maxRcvWindow)));
- attributes.add(Attributes.create("current-rcv-window", String
- .valueOf(rcvWindow)));
+ attributes.add(Attributes.create("max-send-window", String.valueOf(sendWindowSize)));
+ attributes.add(Attributes.create("current-send-window", String.valueOf(sendWindow.availablePermits())));
+ attributes.add(Attributes.create("max-rcv-window", String.valueOf(maxRcvWindow)));
+ attributes.add(Attributes.create("current-rcv-window", String.valueOf(rcvWindow)));
// Encryption
- attributes.add(Attributes.create("ssl-encryption", String
- .valueOf(session.isEncrypted())));
+ attributes.add(Attributes.create("ssl-encryption", String.valueOf(session.isEncrypted())));
// Data generation
- attributes.add(Attributes.create("generation-id", String
- .valueOf(generationId)));
+ attributes.add(Attributes.create("generation-id", String.valueOf(generationId)));
return attributes;
}
@@ -923,20 +917,12 @@
}
/**
- * Requests to shutdown the writer.
- */
- protected void shutdownWriter()
- {
- shutdownWriter = true;
- }
-
- /**
* Shutdown This ServerHandler.
*/
@Override
public void shutdown()
{
- shutdownWriter();
+ shutdownWriter = true;
setConsumerActive(false);
super.shutdown();
@@ -1141,21 +1127,6 @@
}
/**
- * Log the messages involved in the Topology/StartSession handshake.
- * @param inStartECLSessionMsg The message received first.
- */
- protected void logStartECLSessionHandshake(
- StartECLSessionMsg inStartECLSessionMsg)
- {
- if (logger.isTraceEnabled())
- {
- logger.trace("In " + this.replicationServer.getMonitorInstanceName()
- + ", " + getClass().getSimpleName() + " " + this + " :"
- + "\nSH SESSION HANDSHAKE RECEIVED:\n" + inStartECLSessionMsg);
- }
- }
-
- /**
* Process a Ack message received.
* @param ack the message received.
*/
--
Gitblit v1.10.0