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

## Class GridDhtPartitionsAbstractMessage

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheMessage
  - - org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsAbstractMessage

All Implemented Interfaces:
  Serializable, Message

Direct Known Subclasses:
  GridDhtPartitionsFullMessage, GridDhtPartitionsSingleMessage, GridDhtPartitionsSingleRequest

    public abstract class GridDhtPartitionsAbstractMessage
    extends GridCacheMessage

Request for single partition info.

See Also:
  Serialized Form

### Field Summary

Fields
`protected static byte` `COMPRESSED_FLAG_MASK`

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

`addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, cacheId, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX`

### Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message

`DIRECT_TYPE_SIZE`

### Constructor Summary

Constructors
`protected` `GridDhtPartitionsAbstractMessage()` Required by `Externalizable`.

### Method Summary

Methods
`boolean` `addDeploymentInfo()` Deployment enabled flag indicates whether deployment info has to be added to this message.
`protected boolean` `compressed()`
`protected void` `compressed(boolean compressed)`
`GridDhtPartitionExchangeId` `exchangeId()`
`GridCacheVersion` `lastVersion()`
`int` `partition()`
`boolean` `partitionExchangeMessage()`
`abstract Map<Integer,T2<Long,Long>>` `partitionUpdateCounters(int cacheId)`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`String` `toString()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

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

`appendFlag, cacheId, cacheId, classError, deployInfo, error, finishUnmarshal, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, nextIndexId, onAckReceived, onClassError, prepare, prepareMarshal, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, 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`

### Methods inherited from interface org.apache.ignite.plugin.extensions.communication.Message

`directType, fieldsCount`

### Field Detail

#### COMPRESSED_FLAG_MASK

    protected static final byte COMPRESSED_FLAG_MASK

See Also:
  Constant Field Values

### Constructor Detail

#### GridDhtPartitionsAbstractMessage

    protected GridDhtPartitionsAbstractMessage()

Required by `Externalizable`.

### Method Detail

#### partition

    public int partition()

Overrides:
  `partition` in class `GridCacheMessage`
Returns:
  Partition ID this message is targeted to or `-1` if it cannot be determined.

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

#### partitionExchangeMessage

    public boolean partitionExchangeMessage()

Overrides:
  `partitionExchangeMessage` in class `GridCacheMessage`
Returns:
  `True` if this message is partition exchange message.

#### exchangeId

    @Nullable
    public GridDhtPartitionExchangeId exchangeId()

Returns:
  Exchange ID. `Null` if message doesn't belong to exchange process.

#### partitionUpdateCounters

    public abstract Map<Integer,T2<Long,Long>> partitionUpdateCounters(int cacheId)

Parameters:
  `cacheId` - Cache ID.
Returns:
  Parition update counters.

#### lastVersion

    @Nullable
    public GridCacheVersion lastVersion()

Returns:
  Last used version among all nodes.

#### compressed

    protected final boolean compressed()

Returns:
  `True` if message data is compressed.

#### compressed

    protected final void compressed(boolean compressed)

Parameters:
  `compressed` - `True` if message data is compressed.

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

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCacheMessage`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017