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

## Class GridNearTxEnlistRequest

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheMessage
  - - org.apache.ignite.internal.processors.cache.GridCacheIdMessage
    - - org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistRequest

All Implemented Interfaces:
  Serializable, GridCacheDeployable, Message

    public class GridNearTxEnlistRequest
    extends GridCacheIdMessage
    implements GridCacheDeployable

Request to enlist into transaction and acquire locks for entries produced with Cache API operations. One request per batch of entries is used.

See Also:
  Serialized Form

### Field Summary

### 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
`GridNearTxEnlistRequest()` Default constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `addDeploymentInfo()` Deployment enabled flag indicates whether deployment info has to be added to this message.
`short` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`CacheEntryPredicate` `filter()`
`void` `finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr)` This method is called after the message is deserialized and is responsible for unmarshalling state marshalled in `GridCacheMessage.prepareMarshal(GridCacheSharedContext)` method.
`boolean` `firstClientRequest()`
`IgniteUuid` `futureId()`
`boolean` `keepBinary()`
`int` `miniId()`
`MvccSnapshot` `mvccSnapshot()`
`boolean` `needRes()`
`EnlistOperation` `operation()`
`void` `prepareMarshal(GridCacheSharedContext ctx)` This method is called before the whole message is serialized and is responsible for pre-marshalling state.
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`Collection<Object>` `rows()`
`UUID` `subjectId()`
`int` `taskNameHash()`
`long` `threadId()`
`long` `timeout()`
`AffinityTopologyVersion` `topologyVersion()` Gets topology version or -1 in case of topology version is not required for this message.
`String` `toString()`
`long` `txTimeout()`
`GridCacheVersion` `version()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### 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, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, 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`

### Constructor Detail

#### GridNearTxEnlistRequest

    public GridNearTxEnlistRequest()

Default constructor.

### Method Detail

#### threadId

    public long threadId()

Returns:
  Thread id.

#### futureId

    public IgniteUuid futureId()

Returns:
  Future id.

#### miniId

    public int miniId()

Returns:
  Mini future ID.

#### subjectId

    public UUID subjectId()

Returns:
  Subject id.

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

#### version

    public GridCacheVersion version()

Returns:
  Lock version.

#### mvccSnapshot

    public MvccSnapshot mvccSnapshot()

Returns:
  MVCC snapshot.

#### timeout

    public long timeout()

Returns:
  Timeout milliseconds.

#### txTimeout

    public long txTimeout()

Returns:
  Tx timeout milliseconds.

#### taskNameHash

    public int taskNameHash()

Returns:
  Task name hash.

#### firstClientRequest

    public boolean firstClientRequest()

Returns:
  `True` if this is the first client request.

#### rows

    public Collection<Object> rows()

Returns:
  Collection of rows.

#### operation

    public EnlistOperation operation()

Returns:
  Operation.

#### needRes

    public boolean needRes()

Returns:
  Need result flag.

#### keepBinary

    public boolean keepBinary()

Returns:
  Keep binary flag.

#### filter

    public CacheEntryPredicate filter()

Returns:
  Filter.

#### prepareMarshal

    public void prepareMarshal(GridCacheSharedContext ctx)
                        throws IgniteCheckedException

This method is called before the whole message is serialized and is responsible for pre-marshalling state.

Overrides:
  `prepareMarshal` in class `GridCacheMessage`
Parameters:
  `ctx` - Cache context.
Throws:
  `IgniteCheckedException` - If failed.

#### finishUnmarshal

    public void finishUnmarshal(GridCacheSharedContext ctx,
                                ClassLoader ldr)
                         throws IgniteCheckedException

This method is called after the message is deserialized and is responsible for unmarshalling state marshalled in `GridCacheMessage.prepareMarshal(GridCacheSharedContext)` method.

Overrides:
  `finishUnmarshal` in class `GridCacheMessage`
Parameters:
  `ctx` - Context.
  `ldr` - Class loader.
Throws:
  `IgniteCheckedException` - If failed.

#### 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 `GridCacheIdMessage`
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 `GridCacheIdMessage`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

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

#### addDeploymentInfo

    public boolean addDeploymentInfo()

Deployment enabled flag indicates whether deployment info has to be added to this message.

Specified by:
  `addDeploymentInfo` in class `GridCacheMessage`
Returns:
  `true` or if deployment info must be added to the the message, `false` otherwise.

#### directType

    public short directType()

Gets message type.

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

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCacheIdMessage`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021