| | |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | |
| | | import java.util.Iterator; |
| | | |
| | | import org.opends.server.replication.common.ExternalChangeLogSession; |
| | | import org.opends.server.replication.common.MultiDomainServerState; |
| | | import org.opends.server.replication.protocol.ECLUpdateMsg; |
| | | import org.opends.server.replication.protocol.StartECLSessionMsg; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | /** |
| | | * This interface defines a session used to search the external changelog |
| | |
| | | { |
| | | handler.getDomain().stopServer(handler); |
| | | } |
| | | |
| | | /** |
| | | * Returns the last (newest) cookie value. |
| | | * @return the last cookie value. |
| | | */ |
| | | public MultiDomainServerState getLastCookie() |
| | | { |
| | | MultiDomainServerState result = new MultiDomainServerState(); |
| | | // Initialize start state for all running domains with empty state |
| | | Iterator<ReplicationServerDomain> rsdk = rs.getDomainIterator(); |
| | | if (rsdk != null) |
| | | { |
| | | while (rsdk.hasNext()) |
| | | { |
| | | // process a domain |
| | | ReplicationServerDomain rsd = rsdk.next(); |
| | | if (rsd.getBaseDn().compareToIgnoreCase( |
| | | ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT)==0) |
| | | continue; |
| | | result.update(rsd.getBaseDn(), rsd.getEligibleState( |
| | | rs.getEligibleCN())); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | } |