Package org.infinispan.commands.tx
Class RollbackCommand
- java.lang.Object
-
- org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
-
- org.infinispan.commands.tx.RollbackCommand
-
- All Implemented Interfaces:
CacheRpcCommand,ReplicableCommand,TopologyAffectedCommand,TransactionBoundaryCommand,VisitableCommand
public class RollbackCommand extends AbstractTransactionBoundaryCommand
Command corresponding to a transaction rollback.- 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
Fields Modifier and Type Field Description static byteCOMMAND_ID-
Fields inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
cacheName, globalTx
-
-
Constructor Summary
Constructors Constructor Description RollbackCommand(ByteString cacheName)RollbackCommand(ByteString cacheName, GlobalTransaction globalTransaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectacceptVisitor(InvocationContext ctx, Visitor visitor)Accept a visitor, and return the result of accepting this visitor.bytegetCommandId()Used by marshallers to convert this command into an id for streaming.CompletionStage<?>invokeAsync(ComponentRegistry registry)Invoke the command asynchronously.StringtoString()voidvisitRemoteTransaction(RemoteTransaction tx)-
Methods inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
equals, getCacheName, getGlobalTransaction, getOrigin, getTopologyId, hashCode, invalidRemoteTxReturnValue, isReturnValueExpected, loadType, markTransactionAsRemote, readFrom, setOrigin, setTopologyId, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, invoke, invokeAsync, isSuccessful
-
Methods inherited from interface org.infinispan.commands.VisitableCommand
init
-
-
-
-
Field Detail
-
COMMAND_ID
public static final byte COMMAND_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RollbackCommand
public RollbackCommand(ByteString cacheName, GlobalTransaction globalTransaction)
-
RollbackCommand
public RollbackCommand(ByteString cacheName)
-
-
Method Detail
-
invokeAsync
public CompletionStage<?> invokeAsync(ComponentRegistry registry) throws Throwable
Description copied from interface:CacheRpcCommandInvoke the command asynchronously.This method replaces
ReplicableCommand.invoke()for remote execution. The default implementation andReplicableCommand.invoke()will be removed in future versions.- Specified by:
invokeAsyncin interfaceCacheRpcCommand- Overrides:
invokeAsyncin classAbstractTransactionBoundaryCommand- Throws:
Throwable
-
acceptVisitor
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
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
-
visitRemoteTransaction
public void visitRemoteTransaction(RemoteTransaction tx)
- Overrides:
visitRemoteTransactionin classAbstractTransactionBoundaryCommand
-
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
public String toString()
- Overrides:
toStringin classAbstractTransactionBoundaryCommand
-
-