*/
package org.opendaylight.controller.cluster.access.commands;
-import akka.actor.ActorRef;
-import com.google.common.base.Preconditions;
import org.opendaylight.controller.cluster.access.ABIVersion;
import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
/**
- * Successful reply to a coordinated commit request. It contains a reference to the actor which is handling the commit
- * process.
+ * Successful reply to a coordinated commit request initiated by a {@link ModifyTransactionRequest}
+ * or {@link CommitLocalTransactionRequest}.
*
* @author Robert Varga
*/
public final class TransactionCanCommitSuccess extends TransactionSuccess<TransactionCanCommitSuccess> {
+ @java.io.Serial
private static final long serialVersionUID = 1L;
- private final ActorRef cohort;
- public TransactionCanCommitSuccess(final TransactionIdentifier identifier, final ActorRef cohort) {
- super(identifier);
- this.cohort = Preconditions.checkNotNull(cohort);
+ private TransactionCanCommitSuccess(final TransactionCanCommitSuccess success, final ABIVersion version) {
+ super(success, version);
}
- public ActorRef getCohort() {
- return cohort;
+ public TransactionCanCommitSuccess(final TransactionIdentifier identifier, final long sequence) {
+ super(identifier, sequence);
}
@Override
- protected AbstractTransactionSuccessProxy<TransactionCanCommitSuccess> externalizableProxy(final ABIVersion version) {
- return new TransactionCanCommitSuccessProxyV1(this);
+ protected TCCS externalizableProxy(final ABIVersion version) {
+ return new TCCS(this);
}
@Override
protected TransactionCanCommitSuccess cloneAsVersion(final ABIVersion version) {
- return this;
+ return new TransactionCanCommitSuccess(this, version);
}
}