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

## Class GridNearTxPrepareRequest

- 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.GridDistributedTxPrepareRequest
        - - org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest

All Implemented Interfaces:
  Serializable, GridCacheDeployable, IgniteTxStateAware, GridCacheVersionable, Message

    public class GridNearTxPrepareRequest
    extends GridDistributedTxPrepareRequest

Near transaction prepare request.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest

`STORE_WRITE_THROUGH_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
`GridNearTxPrepareRequest()` Empty constructor required for `Externalizable`.

`GridNearTxPrepareRequest(IgniteUuid futId, AffinityTopologyVersion topVer, GridNearTxLocal tx, long timeout, Collection<IgniteTxEntry> reads, Collection<IgniteTxEntry> writes, boolean near, Map<UUID,Collection<UUID>> txNodes, boolean last, boolean onePhaseCommit, boolean retVal, boolean implicitSingle, boolean explicitLock, UUID subjId, int taskNameHash, boolean firstClientReq, boolean addDepInfo)`

### Method Summary

Methods
`void` `cloneEntries()`
`short` `directType()` Gets message type.
`boolean` `explicitLock()`
`byte` `fieldsCount()` Gets fields count.
`boolean` `firstClientRequest()`
`IgniteUuid` `futureId()`
`boolean` `implicitSingle()`
`int` `miniId()`
`void` `miniId(int miniId)`
`boolean` `near()`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`UUID` `subjectId()`
`int` `taskNameHash()`
`AffinityTopologyVersion` `topologyVersion()` Gets topology version or -1 in case of topology version is not required for this message.
`String` `toString()`
`protected boolean` `transferExpiryPolicy()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest

`addDeploymentInfo, addDhtVersion, concurrency, dhtVersions, finishUnmarshal, isInvalidate, isolation, last, messageLogger, needReturnValue, needReturnValue, onePhaseCommit, policy, prepareMarshal, reads, reads, storeWriteThrough, storeWriteThrough, system, threadId, timeout, transactionNodes, txSize, txState, txState, writes, writes, writeVersion`

### Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage

`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, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, 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`

### Constructor Detail

#### GridNearTxPrepareRequest

    public GridNearTxPrepareRequest()

Empty constructor required for `Externalizable`.

#### GridNearTxPrepareRequest

    public GridNearTxPrepareRequest(IgniteUuid futId,
                            AffinityTopologyVersion topVer,
                            GridNearTxLocal tx,
                            long timeout,
                            Collection<IgniteTxEntry> reads,
                            Collection<IgniteTxEntry> writes,
                            boolean near,
                            Map<UUID,Collection<UUID>> txNodes,
                            boolean last,
                            boolean onePhaseCommit,
                            boolean retVal,
                            boolean implicitSingle,
                            boolean explicitLock,
                            @Nullable
                            UUID subjId,
                            int taskNameHash,
                            boolean firstClientReq,
                            boolean addDepInfo)

Parameters:
  `futId` - Future ID.
  `topVer` - Topology version.
  `tx` - Transaction.
  `timeout` - Transaction timeout.
  `reads` - Read entries.
  `writes` - Write entries.
  `near` - `True` if mapping is for near caches.
  `txNodes` - Transaction nodes mapping.
  `last` - `True` if this last prepare request for node.
  `onePhaseCommit` - One phase commit flag.
  `retVal` - Return value flag.
  `implicitSingle` - Implicit single flag.
  `explicitLock` - Explicit lock flag.
  `subjId` - Subject ID.
  `taskNameHash` - Task name hash.
  `firstClientReq` - `True` if first optimistic tx prepare request sent from client node.
  `addDepInfo` - Deployment info flag.

### Method Detail

#### firstClientRequest

    public final boolean firstClientRequest()

Returns:
  `True` if first optimistic tx prepare request sent from client node.

#### near

    public final boolean near()

Returns:
  `True` if mapping is for near-enabled caches.

#### futureId

    public IgniteUuid futureId()

Returns:
  Future ID.

#### miniId

    public int miniId()

Returns:
  Mini future ID.

#### miniId

    public void miniId(int miniId)

Parameters:
  `miniId` - Mini future ID.

#### subjectId

    @Nullable
    public UUID subjectId()

Returns:
  Subject ID.

#### taskNameHash

    public int taskNameHash()

Returns:
  Task name hash.

#### implicitSingle

    public final boolean implicitSingle()

Returns:
  Implicit single flag.

#### explicitLock

    public final boolean explicitLock()

Returns:
  Explicit lock flag.

#### topologyVersion

    public 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.

#### cloneEntries

    public void cloneEntries()

#### transferExpiryPolicy

    protected boolean transferExpiryPolicy()

Overrides:
  `transferExpiryPolicy` in class `GridCacheMessage`
Returns:
  `True` if entries expire policy should be marshalled.

#### 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 `GridDistributedTxPrepareRequest`
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 `GridDistributedTxPrepareRequest`
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`
Overrides:
  `directType` in class `GridDistributedTxPrepareRequest`
Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

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

#### toString

    public String toString()

Overrides:
  `toString` in class `GridDistributedTxPrepareRequest`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017