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

mrossign
19.53.2010 874f6e3a092bdaa5f151c512c9284b15f5886e82
opends/src/server/org/opends/server/replication/common/ServerState.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 */
package org.opends.server.replication.common;
@@ -126,7 +126,7 @@
   * of a server state.
   *
   * @param in the byte array where to calculate the string.
   * @param pos the position whre to start from in the byte array.
   * @param pos the position where to start from in the byte array.
   * @return the length of the next string.
   * @throws DataFormatException If the byte array does not end with null.
   */
@@ -174,6 +174,33 @@
  }
  /**
   * Update the Server State with a Server State. Every change number of this
   * object is updated with the change number of the passed server state if
   * it is newer.
   *
   * @param serverState the server state to use for the update.
   *
   * @return a boolean indicating if the update was meaningful.
   */
  public boolean update(ServerState serverState)
  {
    if (serverState == null)
      return false;
    boolean updated = false;
    for (ChangeNumber cn : serverState.list.values())
    {
      if (update(cn))
      {
        updated = true;
      }
    }
    return updated;
  }
  /**
   * Replace the Server State with another ServerState.
   *
   * @param serverState The ServerState.