Package 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,TopologyAffectedCommand,TransactionBoundaryCommand,VisitableCommand,RemoteLockCommand,TransactionalRemoteLockCommand
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType -
Field Summary
FieldsFields inherited from class org.infinispan.commands.tx.PrepareCommand
modifications, onePhaseCommit, retriedCommandFields inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
cacheName, globalTx -
Constructor Summary
ConstructorsConstructorDescriptionVersionedPrepareCommand(ByteString cacheName) VersionedPrepareCommand(ByteString cacheName, GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhase) -
Method Summary
Modifier and TypeMethodDescriptionbyteUsed by marshallers to convert this command into an id for streaming.booleanIf true, a return value will be provided when performed remotely.voidreadFrom(ObjectInput input) Reads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput).voidsetVersionsSeen(Map<Object, IncrementableEntryVersion> versionsSeen) toString()voidwriteTo(ObjectOutput output) Writes this instance to theObjectOutput.Methods inherited from class org.infinispan.commands.tx.PrepareCommand
acceptVisitor, createContext, getAffectedKeys, getKeyLockOwner, getKeysToLock, getModifications, hasModifications, hasSkipLocking, hasZeroLockAcquisition, invokeAsync, isOnePhaseCommit, isReplayEntryWrapping, isRetriedCommand, setReplayEntryWrapping, setRetriedCommandMethods inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
equals, getCacheName, getGlobalTransaction, getOrigin, getTopologyId, hashCode, invalidRemoteTxReturnValue, loadType, markTransactionAsRemote, setOrigin, setTopologyId, visitRemoteTransactionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, invoke, invokeAsync, isSuccessful, logThrowableMethods inherited from interface org.infinispan.commands.VisitableCommand
init
-
Field Details
-
COMMAND_ID
public static final byte COMMAND_ID- See Also:
-
-
Constructor Details
-
VersionedPrepareCommand
public VersionedPrepareCommand() -
VersionedPrepareCommand
public VersionedPrepareCommand(ByteString cacheName, GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhase) -
VersionedPrepareCommand
-
-
Method Details
-
getVersionsSeen
-
setVersionsSeen
-
getCommandId
public byte getCommandId()Description copied from interface:ReplicableCommandUsed by marshallers to convert this command into an id for streaming.- Specified by:
getCommandIdin interfaceReplicableCommand- Overrides:
getCommandIdin classPrepareCommand- Returns:
- the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.
-
writeTo
Description copied from interface:ReplicableCommandWrites this instance to theObjectOutput.- Specified by:
writeToin interfaceReplicableCommand- Overrides:
writeToin classPrepareCommand- Parameters:
output- the stream.- Throws:
IOException- if an error occurred during the I/O.
-
readFrom
Description copied from interface:ReplicableCommandReads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput).- Specified by:
readFromin interfaceReplicableCommand- Overrides:
readFromin classPrepareCommand- Parameters:
input- the stream to read.- Throws:
IOException- if an error occurred during the I/O.ClassNotFoundException- if it tries to load an undefined class.
-
isReturnValueExpected
public boolean isReturnValueExpected()Description copied from interface:ReplicableCommandIf true, a return value will be provided when performed remotely. Otherwise, a remoteResponseGeneratormay choose to simply return null to save on marshalling costs.- Specified by:
isReturnValueExpectedin interfaceReplicableCommand- Overrides:
isReturnValueExpectedin classPrepareCommand- Returns:
- true or false
-
toString
- Overrides:
toStringin classPrepareCommand
-