Class CommitCommand
java.lang.Object
org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
org.infinispan.commands.tx.CommitCommand
- All Implemented Interfaces:
CacheRpcCommand, ReplicableCommand, TopologyAffectedCommand, TracedCommand, TransactionBoundaryCommand, VisitableCommand, VersionAware
- Direct Known Subclasses:
VersionedCommitCommand
Command corresponding to the 2nd phase of 2PC.
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
-
Nested Class Summary
Nested classes/interfaces inherited from interface VisitableCommand
VisitableCommand.LoadType -
Field Summary
Fields inherited from class AbstractTransactionBoundaryCommand
cacheName, globalTx -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceptVisitor(InvocationContext ctx, Visitor visitor) Accept a visitor, and return the result of accepting this visitor.voidaddIracMetadata(int segment, IracMetadata metadata) getIracMetadata(int segment) protected ObjectThis is what is returned to remote callers when an invalid RemoteTransaction is encountered.Returns aNodeVersionrepresenting the Infinispan version in which this command was added.toString()Methods inherited from class AbstractTransactionBoundaryCommand
equals, getCacheName, getGlobalTransaction, getOrigin, getTopologyId, hashCode, invokeAsync, isReturnValueExpected, loadType, markTransactionAsRemote, setOrigin, setTopologyId, visitRemoteTransactionMethods inherited from interface ReplicableCommand
getCommandId, isSuccessful, logThrowable, readFrom, writeToMethods inherited from interface TracedCommand
getOperationName, getSpanAttributes, setSpanAttributesMethods inherited from interface VisitableCommand
init
-
Constructor Details
-
CommitCommand
-
-
Method Details
-
acceptVisitor
Description copied from interface:VisitableCommandAccept a visitor, and return the result of accepting this visitor.- Parameters:
ctx- invocation contextvisitor- visitor to accept- Returns:
- arbitrary return value
- Throws:
Throwable- in the event of problems
-
invalidRemoteTxReturnValue
Description copied from class:AbstractTransactionBoundaryCommandThis is what is returned to remote callers when an invalid RemoteTransaction is encountered. Can happen if a remote node propagates a transactional call to the current node, and the current node has no idea of the transaction in question. Can happen during rehashing, when ownerships are reassigned during a transactions. Returning a null usually means the transactional command succeeded.- Overrides:
invalidRemoteTxReturnValuein classAbstractTransactionBoundaryCommand- Returns:
- return value to respond to a remote caller with if the transaction context is invalid.
-
supportedSince
Description copied from interface:ReplicableCommandReturns aNodeVersionrepresenting the Infinispan version in which this command was added. This value is used to ensure that when the cluster contains different Infinispan versions, only commands compatible with the oldest version are transmitted.Abstract classes should not implement this method as the version should be specific to an individual implementation. Similarly, implementations which extend another
ReplicableCommandshould always override this method.- Returns:
- a
NodeVersioncorresponding to the Infinispan version this command was added.
-
toString
- Overrides:
toStringin classAbstractTransactionBoundaryCommand
-
addIracMetadata
-
getIracMetadata
-