| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | { |
| | | private final CSN csn; |
| | | private boolean committed; |
| | | private LDAPUpdateMsg msg; |
| | | private UpdateMsg msg; |
| | | private final PluginOperation op; |
| | | private ServerState dependencyState; |
| | | |
| | |
| | | * @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; |
| | |
| | | * @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 |
| | | */ |