| | |
| | | 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; |
| | |
| | | * 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); |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public Map<Integer, ServerState> getReplicaStates() |
| | | { |
| | | monitorResponse.set(false); |
| | | |
| | | // publish Monitor Request Message to the Replication Server |
| | | broker.publish(new MonitorRequestMsg(serverID, broker.getRsServerId())); |
| | | |
| | |
| | | { |
| | | synchronized (monitorResponse) |
| | | { |
| | | monitorResponse.wait(10000); |
| | | if (monitorResponse.get() == false) |
| | | { |
| | | monitorResponse.wait(10000); |
| | | } |
| | | } |
| | | } catch (InterruptedException e) |
| | | {} |
| | |
| | | // Notify the sender that the response was received. |
| | | synchronized (monitorResponse) |
| | | { |
| | | monitorResponse.set(true); |
| | | monitorResponse.notify(); |
| | | } |
| | | } |
| | |
| | | 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 |