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

gbellato
12.30.2007 d491fe177f1740e7b5882569d51987a15662fc85
opends/src/server/org/opends/server/replication/protocol/OperationContext.java
@@ -28,6 +28,7 @@
import org.opends.server.replication.common.ChangeNumber;
import org.opends.server.types.Operation;
import org.opends.server.types.operation.PluginOperation;
/**
 * This class describe the replication context that is attached
@@ -84,9 +85,10 @@
  /**
   * Get the change number of an operation.
   *
   * @param op The operation.
   * @param  op The operation.
   *
   * @return The change number of the provided operation, or null if there is
   * no change number associated with the operation.
   *         no change number associated with the operation.
   */
  public static ChangeNumber getChangeNumber(Operation op)
  {
@@ -99,6 +101,24 @@
  }
  /**
   * Get the change number of an operation.
   *
   * @param  op The operation.
   *
   * @return The change number of the provided operation, or null if there is
   *         no change number associated with the operation.
   */
  public static ChangeNumber getChangeNumber(PluginOperation op)
  {
    OperationContext ctx = (OperationContext)op.getAttachment(SYNCHROCONTEXT);
    if (ctx == null)
    {
      return null;
    }
    return ctx.changeNumber;
  }
  /**
   * {@inheritDoc}
   */
  @Override