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

gbellato
27.34.2009 a733cedcf54ab0b979f7f1b762d086e49bd59d72
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
@@ -79,6 +79,7 @@
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.replication.common.AssuredMode;
import org.opends.server.replication.common.ChangeNumber;
import org.opends.server.replication.common.MutableBoolean;
import org.opends.server.replication.common.ServerState;
import org.opends.server.replication.common.ServerStatus;
import org.opends.server.replication.common.StatusMachine;
@@ -309,7 +310,7 @@
   * This object is used as a conditional event to be notified about
   * the reception of monitor information from the Replication Server.
   */
  private Object monitorResponse = new Object();
  private final MutableBoolean monitorResponse = new MutableBoolean(false);
  /**
@@ -585,6 +586,8 @@
   */
  public Map<Integer, ServerState> getReplicaStates()
  {
    monitorResponse.set(false);
    // publish Monitor Request Message to the Replication Server
    broker.publish(new MonitorRequestMsg(serverID, broker.getRsServerId()));
@@ -593,7 +596,10 @@
    {
      synchronized (monitorResponse)
      {
        monitorResponse.wait(10000);
        if (monitorResponse.get() == false)
        {
          monitorResponse.wait(10000);
        }
      }
    } catch (InterruptedException e)
    {}
@@ -844,6 +850,7 @@
          // Notify the sender that the response was received.
          synchronized (monitorResponse)
          {
            monitorResponse.set(true);
            monitorResponse.notify();
          }
        }
@@ -1901,6 +1908,18 @@
    disableService();
    enableService();
    // wait for the domain to reconnect.
    int count = 0;
    while (!isConnected() && (count < 10))
    {
      try
      {
        Thread.sleep(100);
      } catch (InterruptedException e)
      {
      }
    }
    resetGenerationId(getGenerationID());
    // check that at least one ReplicationServer did change its generation-id