Class CommitCommand

All Implemented Interfaces:
CacheRpcCommand, ReplicableCommand, TopologyAffectedCommand, TracedCommand, TransactionBoundaryCommand, VisitableCommand, VersionAware
Direct Known Subclasses:
VersionedCommitCommand

@ProtoTypeId(1061) public class CommitCommand extends AbstractTransactionBoundaryCommand
Command corresponding to the 2nd phase of 2PC.
Since:
4.0
Author:
Manik Surtani (manik@jboss.org)
  • Constructor Details

  • Method Details

    • 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 context
      visitor - visitor to accept
      Returns:
      arbitrary return value
      Throws:
      Throwable - in the event of problems
    • invalidRemoteTxReturnValue

      protected Object invalidRemoteTxReturnValue(TransactionTable txTable)
      Description copied from class: AbstractTransactionBoundaryCommand
      This 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:
      invalidRemoteTxReturnValue in class AbstractTransactionBoundaryCommand
      Returns:
      return value to respond to a remote caller with if the transaction context is invalid.
    • supportedSince

      public NodeVersion supportedSince()
      Description copied from interface: ReplicableCommand
      Returns a NodeVersion representing 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 ReplicableCommand should always override this method.

      Returns:
      a NodeVersion corresponding to the Infinispan version this command was added.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractTransactionBoundaryCommand
    • addIracMetadata

      public void addIracMetadata(int segment, IracMetadata metadata)
    • getIracMetadata

      public IracMetadata getIracMetadata(int segment)