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

Jean-Noel Rouvignac
06.12.2014 2cf4412179a4ca8610d7fbb2108040377290bf82
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -89,12 +89,12 @@
   * topology. Using an AtomicReference to avoid leaking references to costly
   * threads.
   */
  private AtomicReference<MonitoringPublisher> monitoringPublisher =
  private final AtomicReference<MonitoringPublisher> monitoringPublisher =
      new AtomicReference<MonitoringPublisher>();
  /**
   * Maintains monitor data for the current domain.
   */
  private ReplicationDomainMonitor domainMonitor =
  private final ReplicationDomainMonitor domainMonitor =
      new ReplicationDomainMonitor(this);
  /**
@@ -119,7 +119,7 @@
  private final ReplicationDomainDB domainDB;
  /** The ReplicationServer that created the current instance. */
  private ReplicationServer localReplicationServer;
  private final ReplicationServer localReplicationServer;
  /**
   * The generationId of the current replication domain. The generationId is
@@ -161,7 +161,7 @@
   * The timer used to run the timeout code (timer tasks) for the assured update
   * messages we are waiting acks for.
   */
  private Timer assuredTimeoutTimer;
  private final Timer assuredTimeoutTimer;
  /**
   * Counter used to purge the timer tasks references in assuredTimeoutTimer,
   * every n number of treated assured messages.
@@ -187,8 +187,6 @@
    private boolean sendDSTopologyMsg;
    private int excludedDSForTopologyMsg = -1;
    /**
     * Enqueues a TopologyMsg for all the connected directory servers in order
     * to let them know the topology (every known DSs and RSs).
@@ -213,8 +211,6 @@
      }
    }
    /**
     * Enqueues a TopologyMsg for all the connected replication servers in order
     * to let them know our connected LDAP servers.
@@ -224,8 +220,6 @@
      sendRSTopologyMsg = true;
    }
    /**
     * Enqueues a ChangeTimeHeartbeatMsg received from a DS for forwarding to
     * all other RS instances.
@@ -238,19 +232,28 @@
      pendingHeartbeats.put(msg.getCSN().getServerId(), msg);
    }
    private void enqueueDSMonitorMsg(int dsServerId, MonitorMsg msg)
    {
      pendingDSMonitorMsgs.put(dsServerId, msg);
    }
    private void enqueueRSMonitorMsg(int rsServerId, MonitorMsg msg)
    {
      pendingRSMonitorMsgs.put(rsServerId, msg);
    }
    /** {@inheritDoc} */
    @Override
    public String toString()
    {
      return getClass().getSimpleName()
          + " pendingHeartbeats=" + pendingHeartbeats
          + ", pendingDSMonitorMsgs=" + pendingDSMonitorMsgs
          + ", pendingRSMonitorMsgs=" + pendingRSMonitorMsgs
          + ", sendRSTopologyMsg=" + sendRSTopologyMsg
          + ", sendDSTopologyMsg=" + sendDSTopologyMsg
          + ", excludedDSForTopologyMsg=" + excludedDSForTopologyMsg;
    }
  }
  private final Object pendingStatusMessagesLock = new Object();
@@ -2117,7 +2120,7 @@
  /**
   * Clears the Db associated with that domain.
   */
  public void clearDbs()
  private void clearDbs()
  {
    try
    {
@@ -2803,7 +2806,7 @@
      }
    }
    if (pendingMsgs.sendRSTopologyMsg)
    if (pendingMsgs.sendRSTopologyMsg && !connectedRSs.isEmpty())
    {
      final TopologyMsg topoMsg = createTopologyMsgForRS();
      for (ServerHandler handler : connectedRSs.values())