org.infinispan.commands.tx
Class VersionedCommitCommand

java.lang.Object
  extended by org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
      extended by org.infinispan.commands.tx.CommitCommand
          extended by org.infinispan.commands.tx.VersionedCommitCommand
All Implemented Interfaces:
CacheRpcCommand, ReplicableCommand, TransactionBoundaryCommand, VisitableCommand

public class VersionedCommitCommand
extends CommitCommand

The same as a CommitCommand except that version information is also carried by this command, used by optimistically transactional caches making use of write skew checking when using IsolationLevel.REPEATABLE_READ.

Since:
5.1
Author:
Manik Surtani

Field Summary
static byte COMMAND_ID
           
 
Fields inherited from class org.infinispan.commands.tx.CommitCommand
RESEND_PREPARE
 
Fields inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
cacheName, configuration, globalTx, icc, invoker, txTable
 
Constructor Summary
VersionedCommitCommand()
           
VersionedCommitCommand(String cacheName)
           
VersionedCommitCommand(String cacheName, GlobalTransaction gtx)
           
 
Method Summary
 byte getCommandId()
          Used by marshallers to convert this command into an id for streaming.
 Object[] getParameters()
          Used by marshallers to stream this command across a network
 EntryVersionsMap getUpdatedVersions()
           
 void setParameters(int commandId, Object[] args)
          Used by the CommandsFactory to create a command from raw data read off a stream.
 void setUpdatedVersions(EntryVersionsMap updatedVersions)
           
 
Methods inherited from class org.infinispan.commands.tx.CommitCommand
acceptVisitor, invalidRemoteTxReturnValue, toString
 
Methods inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
equals, getCacheName, getConfiguration, getGlobalTransaction, getOrigin, hashCode, ignoreCommandOnStatus, init, injectComponents, isReturnValueExpected, markTransactionAsRemote, perform, setOrigin, shouldInvoke, visitRemoteTransaction
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COMMAND_ID

public static final byte COMMAND_ID
See Also:
Constant Field Values
Constructor Detail

VersionedCommitCommand

public VersionedCommitCommand()

VersionedCommitCommand

public VersionedCommitCommand(String cacheName,
                              GlobalTransaction gtx)

VersionedCommitCommand

public VersionedCommitCommand(String cacheName)
Method Detail

getUpdatedVersions

public EntryVersionsMap getUpdatedVersions()

setUpdatedVersions

public void setUpdatedVersions(EntryVersionsMap updatedVersions)

getCommandId

public byte getCommandId()
Description copied from interface: ReplicableCommand
Used by marshallers to convert this command into an id for streaming.

Specified by:
getCommandId in interface ReplicableCommand
Overrides:
getCommandId in class CommitCommand
Returns:
the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.

getParameters

public Object[] getParameters()
Description copied from interface: ReplicableCommand
Used by marshallers to stream this command across a network

Specified by:
getParameters in interface ReplicableCommand
Overrides:
getParameters in class AbstractTransactionBoundaryCommand
Returns:
an object array of arguments, compatible with pre-2.2.0 MethodCall args.

setParameters

public void setParameters(int commandId,
                          Object[] args)
Description copied from interface: ReplicableCommand
Used by the CommandsFactory to create a command from raw data read off a stream.

Specified by:
setParameters in interface ReplicableCommand
Overrides:
setParameters in class AbstractTransactionBoundaryCommand
Parameters:
commandId - command id to set. This is usually unused but *could* be used in the event of a command having multiple IDs, such as PutKeyValueCommand.
args - object array of args

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.