public class VersionedPrepareCommand extends PrepareCommand
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).VisitableCommand.LoadType
Modifier and Type | Field and Description |
---|---|
static byte |
COMMAND_ID |
modifications, onePhaseCommit, retriedCommand
cacheName, globalTx
Constructor and Description |
---|
VersionedPrepareCommand() |
VersionedPrepareCommand(ByteString cacheName) |
VersionedPrepareCommand(ByteString cacheName,
GlobalTransaction gtx,
List<WriteCommand> modifications,
boolean onePhase) |
Modifier and Type | Method and Description |
---|---|
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Map<Object,IncrementableEntryVersion> |
getVersionsSeen() |
boolean |
isReturnValueExpected()
If true, a return value will be provided when performed remotely.
|
void |
readFrom(ObjectInput input)
Reads this instance from the stream written by
ReplicableCommand.writeTo(ObjectOutput) . |
void |
setVersionsSeen(Map<Object,IncrementableEntryVersion> versionsSeen) |
String |
toString() |
void |
writeTo(ObjectOutput output)
Writes this instance to the
ObjectOutput . |
acceptVisitor, copy, createContext, getAffectedKeys, getKeyLockOwner, getKeysToLock, getModifications, hasModifications, hasSkipLocking, hasZeroLockAcquisition, invokeAsync, isOnePhaseCommit, isReplayEntryWrapping, isRetriedCommand, setReplayEntryWrapping, setRetriedCommand
equals, getCacheName, getGlobalTransaction, getOrigin, getTopologyId, hashCode, invalidRemoteTxReturnValue, loadType, markTransactionAsRemote, setOrigin, setTopologyId, visitRemoteTransaction
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canBlock, invoke, invokeAsync, isSuccessful, setOrigin
init
public static final byte COMMAND_ID
public VersionedPrepareCommand()
public VersionedPrepareCommand(ByteString cacheName, GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhase)
public VersionedPrepareCommand(ByteString cacheName)
public Map<Object,IncrementableEntryVersion> getVersionsSeen()
public void setVersionsSeen(Map<Object,IncrementableEntryVersion> versionsSeen)
public byte getCommandId()
ReplicableCommand
getCommandId
in interface ReplicableCommand
getCommandId
in class PrepareCommand
public void writeTo(ObjectOutput output) throws IOException
ReplicableCommand
ObjectOutput
.writeTo
in interface ReplicableCommand
writeTo
in class PrepareCommand
output
- the stream.IOException
- if an error occurred during the I/O.public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
ReplicableCommand
ReplicableCommand.writeTo(ObjectOutput)
.readFrom
in interface ReplicableCommand
readFrom
in class PrepareCommand
input
- the stream to read.IOException
- if an error occurred during the I/O.ClassNotFoundException
- if it tries to load an undefined class.public boolean isReturnValueExpected()
ReplicableCommand
ResponseGenerator
may choose to simply return null to save on marshalling
costs.isReturnValueExpected
in interface ReplicableCommand
isReturnValueExpected
in class PrepareCommand
public String toString()
toString
in class PrepareCommand
Copyright © 2021 JBoss by Red Hat. All rights reserved.