Class CommitLocalTransactionRequest
- java.lang.Object
-
- org.opendaylight.controller.cluster.access.concepts.Message<T,C>
-
- org.opendaylight.controller.cluster.access.concepts.Request<TransactionIdentifier,T>
-
- org.opendaylight.controller.cluster.access.commands.TransactionRequest<T>
-
- org.opendaylight.controller.cluster.access.commands.AbstractLocalTransactionRequest<CommitLocalTransactionRequest>
-
- org.opendaylight.controller.cluster.access.commands.CommitLocalTransactionRequest
-
- All Implemented Interfaces:
Serializable
,Immutable
,MutationBehaviour<Immutable>
@Beta public final class CommitLocalTransactionRequest extends AbstractLocalTransactionRequest<CommitLocalTransactionRequest>
Request to commit a local transaction. Since local transactions do not introduce state on the backend until they are ready, this message carries a complete set of modifications.- Author:
- Robert Varga
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CommitLocalTransactionRequest(@NonNull TransactionIdentifier identifier, long sequence, @NonNull akka.actor.ActorRef replyTo, @NonNull DataTreeModification mod, @Nullable Exception delayedFailure, boolean coordinated)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MoreObjects.ToStringHelper
addToStringAttributes(MoreObjects.ToStringHelper toStringHelper)
Add attributes to the output ofMessage.toString()
.Optional<Exception>
getDelayedFailure()
Return the delayed error detected on the frontend.DataTreeModification
getModification()
boolean
isCoordinated()
Indicate if this is a coordinated, multi-backend request.-
Methods inherited from class org.opendaylight.controller.cluster.access.commands.AbstractLocalTransactionRequest
cloneAsVersion, externalizableProxy
-
Methods inherited from class org.opendaylight.controller.cluster.access.commands.TransactionRequest
toRequestFailure
-
Methods inherited from class org.opendaylight.controller.cluster.access.concepts.Request
getReplyTo
-
Methods inherited from class org.opendaylight.controller.cluster.access.concepts.Message
getSequence, getTarget, getVersion, toString, toVersion, writeReplace
-
-
-
-
Constructor Detail
-
CommitLocalTransactionRequest
public CommitLocalTransactionRequest(@NonNull TransactionIdentifier identifier, long sequence, @NonNull akka.actor.ActorRef replyTo, @NonNull DataTreeModification mod, @Nullable Exception delayedFailure, boolean coordinated)
-
-
Method Detail
-
getDelayedFailure
public Optional<Exception> getDelayedFailure()
Return the delayed error detected on the frontend. If this error is present, it will be reported as the result of the first step of the commit process.- Returns:
- Delayed failure, if present.
-
getModification
public DataTreeModification getModification()
-
isCoordinated
public boolean isCoordinated()
Indicate if this is a coordinated, multi-backend request. If this method returns true, the backend must act as a cohort participating in the three-phase commit (3PC) protocol to commit this transaction. If this method returns false, the backend should proceed to commit the transaction and respond once the commit completes or fails to complete.- Returns:
- Indication of coordinated commit.
-
addToStringAttributes
protected MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper toStringHelper)
Description copied from class:Message
Add attributes to the output ofMessage.toString()
. Subclasses wanting to contribute additional information should override this method. Any null attributes will be omitted from the output.- Overrides:
addToStringAttributes
in classRequest<TransactionIdentifier,CommitLocalTransactionRequest>
- Parameters:
toStringHelper
- aMoreObjects.ToStringHelper
instance- Returns:
- The
MoreObjects.ToStringHelper
passed in as argument
-
-