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

## Class GridDhtPartitionExchangeId

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

All Implemented Interfaces:
  Externalizable, Serializable, Comparable<GridDhtPartitionExchangeId>, Message

    public class GridDhtPartitionExchangeId
    extends Object
    implements Message, Comparable<GridDhtPartitionExchangeId>, Externalizable

Exchange ID.

See Also:
  Serialized Form

### Field Summary

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

`DIRECT_TYPE_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`GridDhtPartitionExchangeId()` Empty constructor required by `Externalizable`.
`GridDhtPartitionExchangeId(UUID nodeId, DiscoveryEvent discoEvt, AffinityTopologyVersion topVer)`
`GridDhtPartitionExchangeId(UUID nodeId, int evt, AffinityTopologyVersion topVer)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo(GridDhtPartitionExchangeId o)`
`short` `directType()` Gets message type.
`String` `discoveryEventName()`
`boolean` `equals(Object o)`
`int` `event()`
`ClusterNode` `eventNode()`
`byte` `fieldsCount()` Gets fields count.
`int` `hashCode()`
`boolean` `isJoined()`
`boolean` `isLeft()`
`UUID` `nodeId()`
`void` `onAckReceived()` Method called when ack message received.
`void` `readExternal(ObjectInput in)`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`AffinityTopologyVersion` `topologyVersion()`
`String` `toString()`
`void` `writeExternal(ObjectOutput out)`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

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

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

### Constructor Detail

#### GridDhtPartitionExchangeId

    public GridDhtPartitionExchangeId(UUID nodeId,
                                      int evt,
                                      AffinityTopologyVersion topVer)

Parameters:
  `nodeId` - Node ID.
  `evt` - Event type.
  `topVer` - Topology version.

#### GridDhtPartitionExchangeId

    public GridDhtPartitionExchangeId(UUID nodeId,
                                      DiscoveryEvent discoEvt,
                                      AffinityTopologyVersion topVer)

Parameters:
  `nodeId` - Node ID.
  `discoEvt` - Event.
  `topVer` - Topology version.

#### GridDhtPartitionExchangeId

    public GridDhtPartitionExchangeId()

Empty constructor required by `Externalizable`.

### Method Detail

#### nodeId

    public UUID nodeId()

Returns:
  Node ID.

#### event

    public int event()

Returns:
  Event.

#### eventNode

    public ClusterNode eventNode()

Returns:
  Discovery event node.

#### discoveryEventName

    public String discoveryEventName()

Returns:
  Discovery event name.

#### topologyVersion

    public AffinityTopologyVersion topologyVersion()

Returns:
  Order.

#### isJoined

    public boolean isJoined()

Returns:
  `True` if exchange is for new node joining.

#### isLeft

    public boolean isLeft()

Returns:
  `True` if exchange is for node leaving.

#### onAckReceived

    public void onAckReceived()

Method called when ack message received.

Specified by:
  `onAckReceived` in interface `Message`

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

#### compareTo

    public int compareTo(GridDhtPartitionExchangeId o)

Specified by:
  `compareTo` in interface `Comparable<GridDhtPartitionExchangeId>`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                           MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
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`
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.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

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

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020