org.infinispan.commands.tx
Class VersionedPrepareCommand
java.lang.Object
org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
org.infinispan.commands.tx.PrepareCommand
org.infinispan.commands.tx.VersionedPrepareCommand
- All Implemented Interfaces:
- CacheRpcCommand, ReplicableCommand, TransactionBoundaryCommand, VisitableCommand
public class VersionedPrepareCommand
- extends PrepareCommand
Same as PrepareCommand
except that the transaction originator makes evident the versions of entries touched
and stored in a transaction context so that accurate write skew checks may be performed by the lock owner(s).
- Since:
- 5.1
- Author:
- Manik Surtani
Methods inherited from class org.infinispan.commands.tx.PrepareCommand |
acceptVisitor, containsModificationType, copy, existModifications, getAffectedKeys, getModifications, getModificationsCount, hasModifications, initialize, isOnePhaseCommit, isReplayEntryWrapping, perform, setReplayEntryWrapping, writesToASingleKey |
Methods inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand |
equals, getCacheName, getConfiguration, getGlobalTransaction, getOrigin, hashCode, ignoreCommandOnStatus, init, injectComponents, invalidRemoteTxReturnValue, markTransactionAsRemote, setOrigin, shouldInvoke, visitRemoteTransaction |
COMMAND_ID
public static final byte COMMAND_ID
- See Also:
- Constant Field Values
VersionedPrepareCommand
public VersionedPrepareCommand()
VersionedPrepareCommand
public VersionedPrepareCommand(String cacheName,
GlobalTransaction gtx,
List<WriteCommand> modifications,
boolean onePhase)
VersionedPrepareCommand
public VersionedPrepareCommand(String cacheName)
getVersionsSeen
public EntryVersionsMap getVersionsSeen()
setVersionsSeen
public void setVersionsSeen(EntryVersionsMap versionsSeen)
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 PrepareCommand
- 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 PrepareCommand
- 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 PrepareCommand
- 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
isReturnValueExpected
public boolean isReturnValueExpected()
- Description copied from interface:
ReplicableCommand
- If true, a return value will be provided when performed remotely. Otherwise, a remote
ResponseGenerator
may choose to simply return null to save on marshalling costs.
- Specified by:
isReturnValueExpected
in interface ReplicableCommand
- Overrides:
isReturnValueExpected
in class PrepareCommand
- Returns:
- true or false
toString
public String toString()
- Overrides:
toString
in class PrepareCommand
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.