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

Jean-Noel Rouvignac
26.19.2014 6e14a8394d193af0fa32b83d3cc424787d41eadd
opends/src/server/org/opends/server/replication/plugin/PendingChange.java
@@ -29,6 +29,7 @@
import org.opends.server.replication.common.CSN;
import org.opends.server.replication.common.ServerState;
import org.opends.server.replication.protocol.LDAPUpdateMsg;
import org.opends.server.replication.protocol.UpdateMsg;
import org.opends.server.types.operation.PluginOperation;
/**
@@ -39,7 +40,7 @@
{
  private final CSN csn;
  private boolean committed;
  private LDAPUpdateMsg msg;
  private UpdateMsg msg;
  private final PluginOperation op;
  private ServerState dependencyState;
@@ -49,7 +50,7 @@
   * @param op the operation to use
   * @param msg the message to use (can be null for local operations)
   */
  PendingChange(CSN csn, PluginOperation op, LDAPUpdateMsg msg)
  PendingChange(CSN csn, PluginOperation op, UpdateMsg msg)
  {
    this.csn = csn;
    this.committed = false;
@@ -89,12 +90,27 @@
   * @return the message if operation was a replication operation
   * null if the operation was a local operation
   */
  public LDAPUpdateMsg getMsg()
  public UpdateMsg getMsg()
  {
    return msg;
  }
  /**
   * Get the LDAPUpdateMsg associated to this PendingChange.
   *
   * @return the LDAPUpdateMsg if operation was a replication operation, null
   *         otherwise
   */
  public LDAPUpdateMsg getLDAPUpdateMsg()
  {
    if (msg instanceof LDAPUpdateMsg)
    {
      return (LDAPUpdateMsg) msg;
    }
    return null;
  }
  /**
   * Set the message associated to the PendingChange.
   * @param msg the message
   */