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

Jean-Noel Rouvignac
21.26.2013 9d06956010f0e9558909a802cf6ed81c27ca5dd8
opendj-sdk/opends/src/server/org/opends/server/replication/server/MonitoringPublisher.java
@@ -54,8 +54,8 @@
   */
  private static final DebugTracer TRACER = getTracer();
  /** The domain we send monitoring for. */
  private final ReplicationServerDomain replicationServerDomain;
  /** The replication domain we send monitoring for. */
  private final ReplicationServerDomain domain;
  /** Sleep time (in ms) before sending new monitoring messages. */
  private volatile long period;
@@ -79,7 +79,7 @@
        + ") monitor publisher for domain \""
        + replicationServerDomain.getBaseDn() + "\"");
    this.replicationServerDomain = replicationServerDomain;
    this.domain = replicationServerDomain;
    this.period = period;
  }
@@ -107,15 +107,10 @@
        }
        // Send global topology information to peer DSs
        MonitorData monitorData = replicationServerDomain
            .computeDomainMonitorData();
        MonitorMsg monitorMsg = domain.createGlobalTopologyMonitorMsg(0, 0);
        final int localServerId = domain.getLocalRSServerId();
        MonitorMsg monitorMsg = replicationServerDomain
            .createGlobalTopologyMonitorMsg(0, 0, monitorData);
        int localServerId = replicationServerDomain.getLocalRSServerId();
        for (ServerHandler serverHandler : replicationServerDomain
            .getConnectedDSs().values())
        for (ServerHandler serverHandler : domain.getConnectedDSs().values())
        {
          // Set the right sender and destination ids
          monitorMsg.setSenderID(localServerId);
@@ -203,8 +198,7 @@
  private String getMessage(String message)
  {
    return "In RS " + replicationServerDomain.getLocalRSServerId()
        + ", for base dn " + replicationServerDomain.getBaseDn() + ": "
        + message;
    return "In RS " + domain.getLocalRSServerId() + ", for base dn "
        + domain.getBaseDn() + ": " + message;
  }
}