org.apache.ignite.internal.processors.cache.distributed

## 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
`protected static int` `CHECK_COMMITTED_FLAG_MASK`
`protected static int` `EXPLICIT_LOCK_FLAG_MASK`
`protected static int` `NEED_RETURN_VALUE_FLAG_MASK`
`protected static int` `STORE_ENABLED_FLAG_MASK`
`protected static int` `SYS_INVALIDATE_FLAG_MASK`
`protected static int` `WAIT_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 and Description
`GridDistributedTxFinishRequest()` Empty constructor required by `Externalizable`.

`GridDistributedTxFinishRequest(GridCacheVersion xidVer, IgniteUuid futId, AffinityTopologyVersion topVer, GridCacheVersion commitVer, long threadId, boolean commit, boolean invalidate, boolean sys, byte plc, CacheWriteSynchronizationMode syncMode, GridCacheVersion baseVer, Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers, UUID subjId, int taskNameHash, int txSize, boolean addDepInfo)`

### Method Summary

Methods
`GridCacheVersion` `baseVersion()`
`boolean` `commit()`
`GridCacheVersion` `commitVersion()`
`short` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`IgniteUuid` `futureId()`
`protected boolean` `isFlag(int mask)` Reags flag mask.
`boolean` `isInvalidate()`
`IgniteLogger` `messageLogger(GridCacheSharedContext ctx)`
`byte` `policy()`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`boolean` `replyRequired()`
`protected void` `setFlag(boolean flag, int mask)` Sets flag mask.
`UUID` `subjectId()`
`CacheWriteSynchronizationMode` `syncMode()`
`boolean` `system()`
`int` `taskNameHash()`
`long` `threadId()`
`AffinityTopologyVersion` `topologyVersion()` Gets topology version or -1 in case of topology version is not required for this message.
`String` `toString()`
`int` `txSize()`
`IgniteTxState` `txState()`
`void` `txState(IgniteTxState txState)`
`boolean` `writeTo(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, 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 by `Externalizable`.

#### GridDistributedTxFinishRequest

    public 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,
                                  @Nullable
                                  UUID subjId,
                                  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.

#### subjectId

    @Nullable
    public final UUID subjectId()

Returns:
  Subject ID.

#### taskNameHash

    public final int taskNameHash()

Returns:
  Task name hash.

#### topologyVersion

    public final AffinityTopologyVersion topologyVersion()

Description copied from class: `GridCacheMessage`
Gets topology version or -1 in case of topology version is not required for this message.

Overrides:
  `topologyVersion` in class `GridCacheMessage`
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:
  `True` if reply is required.

#### txState

    public IgniteTxState txState()

Specified by:
  `txState` in interface `IgniteTxStateAware`
Returns:
  Transient TX state.

#### txState

    public void txState(IgniteTxState txState)

Specified by:
  `txState` in interface `IgniteTxStateAware`
Parameters:
  `txState` - Transient TX state.

#### messageLogger

    public IgniteLogger messageLogger(GridCacheSharedContext ctx)

Overrides:
  `messageLogger` in class `GridCacheMessage`
Parameters:
  `ctx` - Context.
Returns:
  Logger.

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Overrides:
  `writeTo` in class `GridDistributedBaseMessage`
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:
  `readFrom` in interface `Message`
Overrides:
  `readFrom` in class `GridDistributedBaseMessage`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### directType

    public short directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Specified by:
  `fieldsCount` in interface `Message`
Overrides:
  `fieldsCount` in class `GridCacheIdMessage`
Returns:
  Fields count.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridDistributedBaseMessage`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017