Class GridDistributedTxFinishRequest
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheMessage
-
- org.apache.ignite.internal.processors.cache.GridCacheIdMessage
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishRequest
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,IgniteTxStateAware,GridCacheVersionable,Message
- Direct Known Subclasses:
GridDhtTxFinishRequest,GridNearTxFinishRequest
public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage implements IgniteTxStateAware
Transaction completion message.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static intCHECK_COMMITTED_FLAG_MASKprotected static intEXPLICIT_LOCK_FLAG_MASKprotected static intNEED_RETURN_VALUE_FLAG_MASKprotected static intSTORE_ENABLED_FLAG_MASKprotected static intSYS_INVALIDATE_FLAG_MASKprotected static intWAIT_REMOTE_TX_FLAG_MASK-
Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
ver
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage
cacheId
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX
-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description GridDistributedTxFinishRequest()Empty constructor required byExternalizable.GridDistributedTxFinishRequest(GridCacheVersion xidVer, IgniteUuid futId, @NotNull AffinityTopologyVersion topVer, @Nullable GridCacheVersion commitVer, long threadId, boolean commit, boolean invalidate, boolean sys, byte plc, CacheWriteSynchronizationMode syncMode, GridCacheVersion baseVer, Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers, int taskNameHash, int txSize, boolean addDepInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GridCacheVersionbaseVersion()booleancommit()GridCacheVersioncommitVersion()shortdirectType()Gets message type.bytefieldsCount()Gets fields count.IgniteUuidfutureId()protected booleanisFlag(int mask)Reags flag mask.booleanisInvalidate()IgniteLoggermessageLogger(GridCacheSharedContext<?,?> ctx)bytepolicy()booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.booleanreplyRequired()protected voidsetFlag(boolean flag, int mask)Sets flag mask.CacheWriteSynchronizationModesyncMode()booleansystem()inttaskNameHash()longthreadId()AffinityTopologyVersiontopologyVersion()Gets topology version or -1 in case of topology version is not required for this message.StringtoString()inttxSize()IgniteTxStatetxState()voidtxState(IgniteTxState txState)booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
addDeploymentInfo, committedVersions, completedVersions, rolledbackVersions, version, version
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage
cacheGroupMessage, cacheId, cacheId, handlerId
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
appendFlag, classError, deployInfo, error, finishUnmarshal, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, prepareMarshal, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheDeployable
deployInfo, prepare
-
-
-
-
Field Detail
-
WAIT_REMOTE_TX_FLAG_MASK
protected static final int WAIT_REMOTE_TX_FLAG_MASK
- See Also:
- Constant Field Values
-
CHECK_COMMITTED_FLAG_MASK
protected static final int CHECK_COMMITTED_FLAG_MASK
- See Also:
- Constant Field Values
-
NEED_RETURN_VALUE_FLAG_MASK
protected static final int NEED_RETURN_VALUE_FLAG_MASK
- See Also:
- Constant Field Values
-
SYS_INVALIDATE_FLAG_MASK
protected static final int SYS_INVALIDATE_FLAG_MASK
- See Also:
- Constant Field Values
-
EXPLICIT_LOCK_FLAG_MASK
protected static final int EXPLICIT_LOCK_FLAG_MASK
- See Also:
- Constant Field Values
-
STORE_ENABLED_FLAG_MASK
protected static final int STORE_ENABLED_FLAG_MASK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GridDistributedTxFinishRequest
public GridDistributedTxFinishRequest()
Empty constructor required byExternalizable.
-
GridDistributedTxFinishRequest
public GridDistributedTxFinishRequest(GridCacheVersion xidVer, IgniteUuid futId, @NotNull @NotNull AffinityTopologyVersion topVer, @Nullable @Nullable GridCacheVersion commitVer, long threadId, boolean commit, boolean invalidate, boolean sys, byte plc, CacheWriteSynchronizationMode syncMode, GridCacheVersion baseVer, Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers, int taskNameHash, int txSize, boolean addDepInfo)
- Parameters:
xidVer- Transaction ID.futId- future ID.threadId- Thread ID.commitVer- Commit version.commit- Commit flag.invalidate- Invalidate flag.sys- System transaction flag.plc- IO policy.syncMode- Write synchronization mode.baseVer- Base version.committedVers- Committed versions.rolledbackVers- Rolled back versions.txSize- Expected transaction size.addDepInfo- Deployment info flag.
-
-
Method Detail
-
syncMode
public final CacheWriteSynchronizationMode syncMode()
- Returns:
- Transaction write synchronization mode (can be null is message sent from old nodes).
-
setFlag
protected final void setFlag(boolean flag, int mask)Sets flag mask.- Parameters:
flag- Set or clear.mask- Mask.
-
isFlag
protected final boolean isFlag(int mask)
Reags flag mask.- Parameters:
mask- Mask to read.- Returns:
- Flag value.
-
taskNameHash
public final int taskNameHash()
- Returns:
- Task name hash.
-
topologyVersion
public final AffinityTopologyVersion topologyVersion()
Description copied from class:GridCacheMessageGets topology version or -1 in case of topology version is not required for this message.- Overrides:
topologyVersionin classGridCacheMessage- Returns:
- Topology version.
-
system
public boolean system()
- Returns:
- System transaction flag.
-
policy
public byte policy()
- Returns:
- IO policy.
-
futureId
public IgniteUuid futureId()
- Returns:
- Future ID.
-
threadId
public long threadId()
- Returns:
- Thread ID.
-
commitVersion
public GridCacheVersion commitVersion()
- Returns:
- Commit version.
-
commit
public boolean commit()
- Returns:
- Commit flag.
-
isInvalidate
public boolean isInvalidate()
- Returns:
- Invalidate flag.
-
baseVersion
public GridCacheVersion baseVersion()
- Returns:
- Base version.
-
txSize
public int txSize()
- Returns:
- Expected tx size.
-
replyRequired
public boolean replyRequired()
- Returns:
Trueif reply is required.
-
txState
public IgniteTxState txState()
- Specified by:
txStatein interfaceIgniteTxStateAware- Returns:
- Transient TX state.
-
txState
public void txState(IgniteTxState txState)
- Specified by:
txStatein interfaceIgniteTxStateAware- Parameters:
txState- Transient TX state.
-
messageLogger
public IgniteLogger messageLogger(GridCacheSharedContext<?,?> ctx)
- Overrides:
messageLoggerin classGridCacheMessage- Parameters:
ctx- Context.- Returns:
- Logger.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeToin interfaceMessage- Overrides:
writeToin classGridDistributedBaseMessage- Parameters:
buf- Byte buffer.writer- Writer.- Returns:
- Whether message was fully written.
-
readFrom
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.- Specified by:
readFromin interfaceMessage- Overrides:
readFromin classGridDistributedBaseMessage- Parameters:
buf- Byte buffer.reader- Reader.- Returns:
- Whether message was fully read.
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridCacheIdMessage- Returns:
- Fields count.
-
toString
public String toString()
- Overrides:
toStringin classGridDistributedBaseMessage
-
-