Package org.infinispan.commands.tx
Class CommitCommand
java.lang.Object
org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
org.infinispan.commands.tx.CommitCommand
- All Implemented Interfaces:
CacheRpcCommand,ReplicableCommand,TopologyAffectedCommand,TransactionBoundaryCommand,VisitableCommand
- 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 org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType -
Field Summary
FieldsFields inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
cacheName, globalTx -
Constructor Summary
ConstructorsConstructorDescriptionCommitCommand(ByteString cacheName) CommitCommand(ByteString cacheName, GlobalTransaction gtx) -
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) byteUsed by marshallers to convert this command into an id for streaming.getIracMetadata(int segment) protected ObjectThis is what is returned to remote callers when an invalid RemoteTransaction is encountered.voidreadFrom(ObjectInput input) Reads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput).toString()voidwriteTo(ObjectOutput output) Writes this instance to theObjectOutput.Methods inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
equals, getCacheName, getGlobalTransaction, getOrigin, getTopologyId, hashCode, invokeAsync, isReturnValueExpected, loadType, markTransactionAsRemote, setOrigin, setTopologyId, visitRemoteTransactionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, invoke, invokeAsync, isSuccessful, logThrowableMethods inherited from interface org.infinispan.commands.VisitableCommand
init
-
Field Details
-
COMMAND_ID
public static final byte COMMAND_ID- See Also:
-
-
Constructor Details
-
CommitCommand
-
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.
-
getCommandId
public byte getCommandId()Description copied from interface:ReplicableCommandUsed by marshallers to convert this command into an id for streaming.- Returns:
- the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.
-
toString
- Overrides:
toStringin classAbstractTransactionBoundaryCommand
-
writeTo
Description copied from interface:ReplicableCommandWrites this instance to theObjectOutput.- Specified by:
writeToin interfaceReplicableCommand- Overrides:
writeToin classAbstractTransactionBoundaryCommand- Parameters:
output- the stream.- Throws:
IOException- if an error occurred during the I/O.
-
readFrom
Description copied from interface:ReplicableCommandReads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput).- Specified by:
readFromin interfaceReplicableCommand- Overrides:
readFromin classAbstractTransactionBoundaryCommand- Parameters:
input- the stream to read.- Throws:
IOException- if an error occurred during the I/O.ClassNotFoundException- if it tries to load an undefined class.
-
addIracMetadata
-
getIracMetadata
-