Package org.infinispan.commands.tx
Class VersionedCommitCommand
- java.lang.Object
-
- org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
-
- org.infinispan.commands.tx.CommitCommand
-
- org.infinispan.commands.tx.VersionedCommitCommand
-
- All Implemented Interfaces:
CacheRpcCommand
,ReplicableCommand
,TopologyAffectedCommand
,TransactionBoundaryCommand
,VisitableCommand
public class VersionedCommitCommand extends CommitCommand
The same as aCommitCommand
except that version information is also carried by this command, used by optimistically transactional caches making use of write skew checking when usingIsolationLevel.REPEATABLE_READ
.- Since:
- 5.1
- Author:
- Manik Surtani
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType
-
-
Field Summary
Fields Modifier and Type Field Description static byte
COMMAND_ID
-
Fields inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
cacheName, globalTx
-
-
Constructor Summary
Constructors Constructor Description VersionedCommitCommand()
VersionedCommitCommand(ByteString cacheName)
VersionedCommitCommand(ByteString cacheName, GlobalTransaction gtx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
getCommandId()
Used by marshallers to convert this command into an id for streaming.Map<Object,IncrementableEntryVersion>
getUpdatedVersions()
void
readFrom(ObjectInput input)
Reads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput)
.void
setUpdatedVersions(Map<Object,IncrementableEntryVersion> updatedVersions)
String
toString()
void
writeTo(ObjectOutput output)
Writes this instance to theObjectOutput
.-
Methods inherited from class org.infinispan.commands.tx.CommitCommand
acceptVisitor, addIracMetadata, getIracMetadata, invalidRemoteTxReturnValue
-
Methods inherited from class org.infinispan.commands.tx.AbstractTransactionBoundaryCommand
equals, getCacheName, getGlobalTransaction, getOrigin, getTopologyId, hashCode, invokeAsync, isReturnValueExpected, loadType, markTransactionAsRemote, setOrigin, setTopologyId, visitRemoteTransaction
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, invoke, invokeAsync, isSuccessful, logThrowable
-
Methods inherited from interface org.infinispan.commands.VisitableCommand
init
-
-
-
-
Field Detail
-
COMMAND_ID
public static final byte COMMAND_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VersionedCommitCommand
public VersionedCommitCommand()
-
VersionedCommitCommand
public VersionedCommitCommand(ByteString cacheName, GlobalTransaction gtx)
-
VersionedCommitCommand
public VersionedCommitCommand(ByteString cacheName)
-
-
Method Detail
-
getUpdatedVersions
public Map<Object,IncrementableEntryVersion> getUpdatedVersions()
-
setUpdatedVersions
public void setUpdatedVersions(Map<Object,IncrementableEntryVersion> 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 interfaceReplicableCommand
- Overrides:
getCommandId
in classCommitCommand
- Returns:
- the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.
-
writeTo
public void writeTo(ObjectOutput output) throws IOException
Description copied from interface:ReplicableCommand
Writes this instance to theObjectOutput
.- Specified by:
writeTo
in interfaceReplicableCommand
- Overrides:
writeTo
in classCommitCommand
- Parameters:
output
- the stream.- Throws:
IOException
- if an error occurred during the I/O.
-
readFrom
public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
Description copied from interface:ReplicableCommand
Reads this instance from the stream written byReplicableCommand.writeTo(ObjectOutput)
.- Specified by:
readFrom
in interfaceReplicableCommand
- Overrides:
readFrom
in classCommitCommand
- 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.
-
toString
public String toString()
- Overrides:
toString
in classCommitCommand
-
-