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

pgamba
01.21.2008 05d24dcca61eed7921987a98bb94d94a4aa030cd
opendj-sdk/opends/src/server/org/opends/server/replication/common/ServerState.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 *      Portions Copyright 2006-2008 Sun Microsystems, Inc.
 */
package org.opends.server.replication.common;
@@ -339,4 +339,23 @@
  {
    return list.isEmpty();
  }
  /**
   * Make a duplicate of this state.
   * @return The duplicate of this state.
   */
  public ServerState duplicate()
  {
    ServerState newState = new ServerState();
    synchronized (this)
    {
      for (Short key  : list.keySet())
      {
        ChangeNumber change = list.get(key);
        Short id =  change.getServerId();
        newState.list.put(id,change);
      }
    }
    return newState;
  }
}