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
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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opendaylight.controller.cluster.access.commands.TransactionRequest
TransactionRequest.SerialForm<T extends TransactionRequest<T>>
-
Constructor Summary
ConstructorsConstructorDescriptionCommitLocalTransactionRequest
(@NonNull TransactionIdentifier identifier, long sequence, @NonNull ActorRef replyTo, @NonNull DataTreeModification mod, @Nullable Exception delayedFailure, boolean coordinated) -
Method Summary
Modifier and TypeMethodDescriptionprotected MoreObjects.ToStringHelper
addToStringAttributes
(MoreObjects.ToStringHelper toStringHelper) Add attributes to the output ofMessage.toString()
.Return the delayed error detected on the frontend.boolean
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, throwNSE, toString, toVersion, writeReplace
-
Constructor Details
-
CommitLocalTransactionRequest
public CommitLocalTransactionRequest(@NonNull TransactionIdentifier identifier, long sequence, @NonNull ActorRef replyTo, @NonNull DataTreeModification mod, @Nullable Exception delayedFailure, boolean coordinated)
-
-
Method Details
-
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
-
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
-