mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
20.52.2013 a279ca9e1d01c9bd3f5cb6d05786dbd88ae784f8
opends/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java
@@ -37,6 +37,7 @@
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.*;
@@ -175,6 +176,11 @@
   */
  public void publishHeartbeat(DN baseDN, CSN heartbeatCSN)
  {
    if (isExcludedFromECL(baseDN))
    {
      return;
    }
    lastAliveCSNs.update(baseDN, heartbeatCSN);
    tryNotify(baseDN);
  }
@@ -192,6 +198,11 @@
  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
@@ -199,6 +210,12 @@
    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.