| | |
| | | // Get or Create the ReplicationServerDomain |
| | | replicationServerDomain = |
| | | replicationServer.getReplicationServerDomain(this.baseDn, true); |
| | | |
| | | replicationServerDomain.waitDisconnection(receivedMsg.getServerId()); |
| | | replicationServerDomain.mayResetGenerationId(); |
| | | |
| | | localGenerationId = replicationServerDomain.getGenerationId(); |
| | | |
| | | ServerState localServerState = |
| | |
| | | { |
| | | } |
| | | } |
| | | do { |
| | | boolean acquired = false; |
| | | do |
| | | { |
| | | try |
| | | { |
| | | sendWindow.tryAcquire((long)500, TimeUnit.MILLISECONDS); |
| | | acquired = sendWindow.tryAcquire((long)500, TimeUnit.MILLISECONDS); |
| | | interrupted = false; |
| | | } catch (InterruptedException e) |
| | | { |
| | | // loop until not interrupted |
| | | } |
| | | } while ((interrupted) && (!shutdown)); |
| | | } while (((interrupted) || (!acquired )) && (!shutdown)); |
| | | this.incrementOutCount(); |
| | | return msg; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * Send an ErrorMessage to the peer. |
| | | * |
| | | * @param errorMsg The message to be sent |
| | | * @throws IOException when raised by the underlying session |
| | | */ |
| | | public void sendError(ErrorMessage errorMsg) throws IOException |
| | | { |
| | | session.publish(errorMsg); |
| | | } |
| | | |
| | | /** |
| | | * Process the reception of a WindowProbe message. |
| | | * |
| | | * @param windowProbeMsg The message to process. |