| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | * Portions copyright 2011-2013 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | |
| | | { |
| | | while (true) |
| | | { |
| | | // wait to be resumed or shutdowned |
| | | // wait to be resumed or shutdown |
| | | if ((suspended) && (!shutdown)) |
| | | { |
| | | synchronized(this) |
| | |
| | | ECLUpdateMsg update = null; |
| | | while (true) |
| | | { |
| | | if (shutdown) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (suspended) |
| | | if (shutdown || suspended) |
| | | { |
| | | return; |
| | | } |
| | |
| | | { |
| | | // except if we are in persistent search |
| | | Thread.sleep(200); |
| | | continue; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // Publish the update to the remote server using a protocol version he |
| | | // it supports |
| | | publish(update, protocolVersion); |
| | | publish(update); |
| | | update = null; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * Publish a change either on the protocol session or to a persistent search. |
| | | */ |
| | | private void publish(ECLUpdateMsg msg, short reqProtocolVersion) |
| | | private void publish(ECLUpdateMsg msg) |
| | | throws IOException |
| | | { |
| | | if (debugEnabled()) |