| | |
| | | replicationServerURL, |
| | | getServiceId(), |
| | | maxRcvWindow, |
| | | replicationServerDomain.getDbServerState(), |
| | | new ServerState(), |
| | | protocolVersion, |
| | | localGenerationId, |
| | | sslEncryption, |
| | | getLocalGroupId(), |
| | | replicationServerDomain. |
| | | getReplicationServer().getDegradedStatusThreshold(), |
| | | 0, |
| | | replicationServer.getWeight(), |
| | | replicationServerDomain.getConnectedLDAPservers().size()); |
| | | 0); |
| | | |
| | | |
| | | session.publish(outReplServerStartDSMsg); |
| | | |
| | | return outReplServerStartDSMsg; |
| | | } |
| | | } |
| | |
| | | processStartFromRemote(inECLStartMsg); |
| | | |
| | | // lock with timeout |
| | | lockDomain(true); |
| | | if (this.replicationServerDomain != null) |
| | | lockDomain(true); |
| | | |
| | | this.localGenerationId = replicationServerDomain.getGenerationId(); |
| | | // this.localGenerationId = replicationServerDomain.getGenerationId(); |
| | | this.localGenerationId = -1; |
| | | |
| | | // send start to remote |
| | | StartMsg outStartMsg = |
| | |
| | | { |
| | | HashMap<String,ServerState> startStates = new HashMap<String,ServerState>(); |
| | | |
| | | ReplicationServer rs = replicationServerDomain.getReplicationServer(); |
| | | ReplicationServer rs = this.replicationServer; |
| | | |
| | | // Parse the provided cookie and overwrite startState from it. |
| | | if ((providedCookie != null) && (providedCookie.length()!=0)) |
| | |
| | | if (excludedServiceIDs.contains(rsd.getBaseDn())) |
| | | continue; |
| | | |
| | | // skip unused domains |
| | | if (rsd.getDbServerState().isEmpty()) |
| | | continue; |
| | | |
| | | // Creates the new domain context |
| | | DomainContext newDomainCtxt = new DomainContext(); |
| | | newDomainCtxt.active = true; |
| | |
| | | */ |
| | | private void registerIntoDomain() |
| | | { |
| | | replicationServerDomain.registerHandler(this); |
| | | if (replicationServerDomain!=null) |
| | | replicationServerDomain.registerHandler(this); |
| | | } |
| | | |
| | | /** |
| | |
| | | String str = serverURL + " " + String.valueOf(serverId); |
| | | |
| | | return "Connected External Changelog Server " + str + |
| | | ",cn=" + replicationServerDomain.getMonitorInstanceName(); |
| | | ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT; |
| | | } |
| | | |
| | | /** |
| | |
| | | sendWindow = new Semaphore(sendWindowSize); |
| | | |
| | | // create reader |
| | | reader = new ServerReader(session, serverId, |
| | | this, replicationServerDomain); |
| | | reader = new ServerReader(session, serverId, this); |
| | | reader.start(); |
| | | |
| | | if (writer == null) |
| | |
| | | ECLUpdateMsg oldestChange = null; |
| | | |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("In " + replicationServerDomain.getReplicationServer(). |
| | | getMonitorInstanceName() + "," + this + |
| | | TRACER.debugInfo("In cn=changelog" + this + |
| | | " getNextECLUpdate starts: " + dumpState()); |
| | | |
| | | try |
| | |
| | | // starvation of changelog messages |
| | | // all domain have been unactived means are covered |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("In " + replicationServerDomain.getReplicationServer(). |
| | | getMonitorInstanceName() + "," + this + " closeInitPhase(): " |
| | | TRACER.debugInfo("In cn=changelog" + "," + this + " closeInitPhase(): " |
| | | + dumpState()); |
| | | |
| | | // go to persistent phase if one |
| | |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("In " + replicationServerDomain.getReplicationServer(). |
| | | getMonitorInstanceName() |
| | | TRACER.debugInfo("In cn=changelog" |
| | | + "," + this + " getOldestChangeFromDomainCtxts() returns " + |
| | | ((oldest!=-1)?domainCtxts[oldest].nextMsg:"-1")); |
| | | |