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

Jean-Noel Rouvignac
22.24.2013 9a13d05fcb1b17c52c7b91b8445d334bce3f9e28
opends/src/server/org/opends/server/replication/common/ServerState.java
@@ -192,6 +192,36 @@
  }
  /**
   * Removes the mapping to the provided CSN if it is present in this
   * ServerState.
   *
   * @param expectedCSN
   *          the CSN to be removed
   * @return true if the CSN could be removed, false otherwise.
   */
  public boolean removeCSN(CSN expectedCSN)
  {
    if (expectedCSN == null)
      return false;
    synchronized (serverIdToCSN)
    {
      for (Iterator<CSN> iter = serverIdToCSN.values().iterator();
          iter.hasNext();)
      {
        final CSN csn = iter.next();
        if (expectedCSN.equals(csn))
        {
          iter.remove();
          saved = false;
          return true;
        }
      }
    }
    return false;
  }
  /**
   * Replace the Server State with another ServerState.
   *
   * @param serverState The ServerState.