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

## Class GridNearTxEnlistResponse

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

All Implemented Interfaces:
  Serializable, ExceptionAware, Message

    public class GridNearTxEnlistResponse
    extends GridCacheIdMessage
    implements ExceptionAware

A response to `GridNearTxEnlistRequest`.

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
`GridNearTxEnlistResponse()` Default constructor.
`GridNearTxEnlistResponse(int cacheId, IgniteUuid futId, int miniId, GridCacheVersion lockVer, GridCacheReturn res, GridCacheVersion dhtVer, IgniteUuid dhtFutId, Set<UUID> newDhtNodes)` Constructor for normal result.
`GridNearTxEnlistResponse(int cacheId, IgniteUuid futId, int miniId, GridCacheVersion lockVer, Throwable err)` Constructor for error result.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `addDeploymentInfo()` Deployment enabled flag indicates whether deployment info has to be added to this message.
`IgniteUuid` `dhtFutureId()`
`GridCacheVersion` `dhtVersion()`
`short` `directType()` Gets message type.
`@Nullable Throwable` `error()`
`byte` `fieldsCount()` Gets fields count.
`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.
`IgniteUuid` `futureId()`
`int` `miniId()`
`Collection<UUID>` `newDhtNodes()`
`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.
`GridCacheReturn` `result()`
`String` `toString()`
`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, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, topologyVersion, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### GridNearTxEnlistResponse

    public GridNearTxEnlistResponse()

Default constructor.

#### GridNearTxEnlistResponse

    public GridNearTxEnlistResponse(int cacheId,
                                    IgniteUuid futId,
                                    int miniId,
                                    GridCacheVersion lockVer,
                                    GridCacheReturn res,
                                    GridCacheVersion dhtVer,
                                    IgniteUuid dhtFutId,
                                    Set<UUID> newDhtNodes)

Constructor for normal result.

Parameters:
  `cacheId` - Cache id.
  `futId` - Future id.
  `miniId` - Mini future id.
  `lockVer` - Lock version.
  `res` - Result.
  `dhtVer` - Dht version.
  `dhtFutId` - Dht future id.
  `newDhtNodes` - New DHT nodes involved into transaction.

#### GridNearTxEnlistResponse

    public GridNearTxEnlistResponse(int cacheId,
                                    IgniteUuid futId,
                                    int miniId,
                                    GridCacheVersion lockVer,
                                    Throwable err)

Constructor for error result.

Parameters:
  `cacheId` - Cache id.
  `futId` - Future id.
  `miniId` - Mini future id.
  `lockVer` - Lock version.
  `err` - Error.

### Method Detail

#### version

    public GridCacheVersion version()

Returns:
  Loc version.

#### futureId

    public IgniteUuid futureId()

Returns:
  Future id.

#### miniId

    public int miniId()

Returns:
  Mini future id.

#### result

    public GridCacheReturn result()

Returns:
  Result.

#### error

    @Nullable
    public @Nullable Throwable error()

Specified by:
  `error` in interface `ExceptionAware`
Overrides:
  `error` in class `GridCacheMessage`
Returns:
  Error, if any.

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

#### dhtVersion

    public GridCacheVersion dhtVersion()

Returns:
  Dht version.

#### dhtFutureId

    public IgniteUuid dhtFutureId()

Returns:
  Dht future id.

#### newDhtNodes

    public Collection<UUID> newDhtNodes()

Returns:
  New DHT nodes involved into transaction.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

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

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

#### directType

    public short directType()

Gets message type.

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

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

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCacheIdMessage`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020