| | |
| | | import org.opends.server.replication.common.CSN; |
| | | import org.opends.server.replication.common.MultiDomainServerState; |
| | | import org.opends.server.replication.common.ServerState; |
| | | import org.opends.server.replication.plugin.MultimasterReplication; |
| | | import org.opends.server.replication.protocol.UpdateMsg; |
| | | import org.opends.server.replication.server.ChangelogState; |
| | | import org.opends.server.replication.server.changelog.api.*; |
| | |
| | | */ |
| | | public void publishHeartbeat(DN baseDN, CSN heartbeatCSN) |
| | | { |
| | | if (isExcludedFromECL(baseDN)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | lastAliveCSNs.update(baseDN, heartbeatCSN); |
| | | tryNotify(baseDN); |
| | | } |
| | |
| | | public void publishUpdateMsg(DN baseDN, UpdateMsg updateMsg) |
| | | throws ChangelogException |
| | | { |
| | | if (isExcludedFromECL(baseDN)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | final CSN csn = updateMsg.getCSN(); |
| | | lastAliveCSNs.update(baseDN, csn); |
| | | // only keep the oldest CSN that will be the new cursor's starting point |
| | |
| | | tryNotify(baseDN); |
| | | } |
| | | |
| | | private boolean isExcludedFromECL(DN baseDN) |
| | | { |
| | | Set<String> excludedDNs = MultimasterReplication.getECLDisabledDomains(); |
| | | return excludedDNs.contains(baseDN.toNormalizedString()); |
| | | } |
| | | |
| | | /** |
| | | * Returns the last time each serverId was seen alive for the specified |
| | | * replication domain. |