mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
22.47.2014 a592fe71c4c2e29a136f9700a2981f3dcbd7e114
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.
   */