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
- Direct Known Subclasses:
TotalOrderRollbackCommand
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 byte
COMMAND_ID
-
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 Object
acceptVisitor(InvocationContext ctx, Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.byte
getCommandId()
Used by marshallers to convert this command into an id for streaming.CompletableFuture<Object>
invokeAsync()
Invoke the command asynchronously.String
toString()
void
visitRemoteTransaction(RemoteTransaction tx)
-
Methods inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
canBlock, equals, getCacheName, getGlobalTransaction, getOrigin, getTopologyId, hashCode, init, invalidRemoteTxReturnValue, isReturnValueExpected, loadType, markTransactionAsRemote, perform, 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
invoke, isSuccessful
-
Methods inherited from interface org.infinispan.commands.VisitableCommand
ignoreCommandOnStatus, shouldInvoke
-
-
-
-
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 CompletableFuture<Object> invokeAsync() throws Throwable
Description copied from interface:ReplicableCommand
Invoke the command asynchronously.This method replaces
ReplicableCommand.perform(InvocationContext)
for remote execution. The default implementation andReplicableCommand.perform(InvocationContext)
will be removed in future versions.- Specified by:
invokeAsync
in interfaceReplicableCommand
- Overrides:
invokeAsync
in classAbstractTransactionBoundaryCommand
- Throws:
Throwable
-
acceptVisitor
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
Description copied from interface:VisitableCommand
Accept 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:
visitRemoteTransaction
in classAbstractTransactionBoundaryCommand
-
getCommandId
public byte getCommandId()
Description copied from interface:ReplicableCommand
Used 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:
toString
in classAbstractTransactionBoundaryCommand
-
-