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

Jean-Noel Rouvignac
02.57.2013 9c8493a28711aff83940445f42f923c587eea4f8
opends/src/server/org/opends/server/replication/plugin/PendingChange.java
@@ -40,7 +40,7 @@
 */
public class PendingChange implements Comparable<PendingChange>
{
  private CSN changeNumber;
  private CSN csn;
  private boolean committed;
  private LDAPUpdateMsg msg;
  private PluginOperation op;
@@ -49,15 +49,13 @@
  /**
   * Construct a new PendingChange.
   * @param changeNumber the ChangeNumber of use
   * @param csn the CSN of use
   * @param op the operation to use
   * @param msg the message to use (can be null for local operations)
   */
  public PendingChange(CSN changeNumber,
                       PluginOperation op,
                       LDAPUpdateMsg msg)
  public PendingChange(CSN csn, PluginOperation op, LDAPUpdateMsg msg)
  {
    this.changeNumber = changeNumber;
    this.csn = csn;
    this.committed = false;
    this.op = op;
    this.msg = msg;
@@ -82,12 +80,12 @@
  }
  /**
   * Get the ChangeNumber associated to this PendingChange.
   * @return the ChangeNumber
   * Get the CSN associated to this PendingChange.
   * @return the CSN
   */
  public CSN getCSN()
  {
    return changeNumber;
    return csn;
  }
  /**
@@ -167,16 +165,15 @@
    synchronized (this)
    {
      if (targetDN != null)
        return targetDN;
      else
      {
        try
        {
          targetDN = DN.decode(msg.getDn());
        }
        catch (DirectoryException e)
        {
        }
        return targetDN;
      }
      try
      {
        targetDN = DN.decode(msg.getDn());
      }
      catch (DirectoryException e)
      {
      }
      return targetDN;
    }
@@ -188,6 +185,6 @@
  @Override
  public int compareTo(PendingChange o)
  {
    return this.getCSN().compareTo(o.getCSN());
    return getCSN().compareTo(o.getCSN());
  }
}