| | |
| | | package org.opends.server.replication.server; |
| | | |
| | | import org.opends.messages.*; |
| | | import org.opends.messages.MessageBuilder; |
| | | |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | import java.util.concurrent.Semaphore; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import org.opends.server.admin.std.server.MonitorProviderCfg; |
| | | import org.opends.server.api.MonitorProvider; |
| | |
| | | */ |
| | | HeartbeatThread heartbeatThread = null; |
| | | |
| | | /** |
| | | * Set when ServerHandler is stopping. |
| | | */ |
| | | private boolean shutdown = false; |
| | | |
| | | private static final Map<ChangeNumber, ReplServerAckMessageList> |
| | | changelogsWaitingAcks = |
| | | new HashMap<ChangeNumber, ReplServerAckMessageList>(); |
| | |
| | | do { |
| | | try |
| | | { |
| | | sendWindow.acquire(); |
| | | sendWindow.tryAcquire((long)500, TimeUnit.MILLISECONDS); |
| | | interrupted = false; |
| | | } catch (InterruptedException e) |
| | | { |
| | | // loop until not interrupted |
| | | } |
| | | } while (interrupted); |
| | | } while ((interrupted) && (!shutdown)); |
| | | this.incrementOutCount(); |
| | | return msg; |
| | | } |
| | |
| | | */ |
| | | public void shutdown() |
| | | { |
| | | shutdown = true; |
| | | try |
| | | { |
| | | session.close(); |