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

## Class GridDhtPartitionSupplyMessageV2

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheMessage
  - - org.apache.ignite.internal.processors.cache.GridCacheGroupIdMessage
    - - org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage
      - - org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2

All Implemented Interfaces:
  Serializable, GridCacheDeployable, Message

    public class GridDhtPartitionSupplyMessageV2
    extends GridDhtPartitionSupplyMessage

Supply message with supplier error transfer support.

See Also:
  Serialized Form

### Field Summary

Fields
`static IgniteProductVersion` `AVAILABLE_SINCE` Available since.

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

`grpId`

### 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
`GridDhtPartitionSupplyMessageV2()` Default constructor.
`GridDhtPartitionSupplyMessageV2(long rebalanceId, int grpId, AffinityTopologyVersion topVer, boolean addDepInfo, Throwable err)`

### Method Summary

All Methods Instance Methods Concrete Methods
`short` `directType()` Gets message type.
`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.
`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.
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage

`addDeploymentInfo, addEstimatedKeysCount, addKeysForCache, estimatedKeysCount, ignoreClassErrors, keysForCache, size, topologyVersion, toString`

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

`cacheGroupMessage, groupId, handlerId`

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

`appendFlag, classError, deployInfo, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, 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`

### Field Detail

#### AVAILABLE_SINCE

    public static final IgniteProductVersion AVAILABLE_SINCE

Available since.

### Constructor Detail

#### GridDhtPartitionSupplyMessageV2

    public GridDhtPartitionSupplyMessageV2()

Default constructor.

#### GridDhtPartitionSupplyMessageV2

    public GridDhtPartitionSupplyMessageV2(long rebalanceId,
                                           int grpId,
                                           AffinityTopologyVersion topVer,
                                           boolean addDepInfo,
                                           Throwable err)

Parameters:
  `rebalanceId` - Rebalance id.
  `grpId` - Group id.
  `topVer` - Topology version.
  `addDepInfo` - Add dep info.
  `err` - Supply process error.

### Method Detail

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

#### error

    @Nullable
    public Throwable error()

Overrides:
  `error` in class `GridCacheMessage`
Returns:
  Error, if any.

#### directType

    public short directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Overrides:
  `directType` in class `GridDhtPartitionSupplyMessage`
Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

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

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.6
Release Date | : September 11 2019