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, TracedCommand, TransactionBoundaryCommand, VisitableCommand, VersionAware, 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 VisitableCommand
VisitableCommand.LoadType -
Field Summary
Fields inherited from class PrepareCommand
modifications, onePhaseCommit, retriedCommandFields inherited from class AbstractTransactionBoundaryCommand
cacheName, globalTx -
Constructor Summary
ConstructorsConstructorDescriptionVersionedPrepareCommand(ByteString cacheName, GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhase) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf true, a return value will be provided when performed remotely.voidsetVersionsSeen(Map<Object, IncrementableEntryVersion> versionsSeen) Returns aNodeVersionrepresenting the Infinispan version in which this command was added.toString()Methods inherited from class PrepareCommand
acceptVisitor, createContext, getAffectedKeys, getKeyLockOwner, getKeysToLock, getModifications, hasModifications, hasSkipLocking, hasZeroLockAcquisition, invokeAsync, isOnePhaseCommit, isReplayEntryWrapping, isRetriedCommand, setReplayEntryWrapping, setRetriedCommandMethods inherited from class AbstractTransactionBoundaryCommand
equals, getCacheName, getGlobalTransaction, getOrigin, getTopologyId, hashCode, invalidRemoteTxReturnValue, loadType, markTransactionAsRemote, setOrigin, setTopologyId, visitRemoteTransactionMethods inherited from interface ReplicableCommand
getCommandId, isSuccessful, logThrowable, readFrom, writeToMethods inherited from interface TracedCommand
getOperationName, getSpanAttributes, setSpanAttributesMethods inherited from interface VisitableCommand
init
-
Constructor Details
-
VersionedPrepareCommand
public VersionedPrepareCommand(ByteString cacheName, GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhase)
-
-
Method Details
-
getVersionsSeen
-
setVersionsSeen
-
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
-
supportedSince
Description copied from interface:ReplicableCommandReturns aNodeVersionrepresenting 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
ReplicableCommandshould always override this method.- Specified by:
supportedSincein interfaceReplicableCommand- Specified by:
supportedSincein interfaceVersionAware- Overrides:
supportedSincein classPrepareCommand- Returns:
- a
NodeVersioncorresponding to the Infinispan version this command was added.
-
toString
- Overrides:
toStringin classPrepareCommand
-