org.apache.ignite.spi.discovery.tcp.internal

## Class DiscoveryDataPacket

- java.lang.Object
- - org.apache.ignite.spi.discovery.tcp.internal.DiscoveryDataPacket

All Implemented Interfaces:
  Serializable

    public class DiscoveryDataPacket
    extends Object
    implements Serializable

Carries discovery data in marshalled form and allows convenient way of converting it to and from `DiscoveryDataBag` objects.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`DiscoveryDataPacket(UUID joiningNodeId)`

### Method Summary

All Methods Instance Methods Concrete Methods
`DiscoveryDataBag` `bagForDataCollection()` Returns `DiscoveryDataBag` aware of components with already initialized common data (e.g. on nodes prior in cluster to the one where this method is called).
`boolean` `hasDataFromNode(UUID nodeId)`
`boolean` `hasJoiningNodeData()`
`UUID` `joiningNodeId()`
`void` `marshalGridNodeData(DiscoveryDataBag bag, UUID nodeId, Marshaller marsh, IgniteLogger log)`
`void` `marshalJoiningNodeData(DiscoveryDataBag bag, Marshaller marsh, IgniteLogger log)`
`boolean` `mergeDataFrom(DiscoveryDataPacket existingDataPacket, Collection<Integer> mrgdCmnDataKeys, Collection<UUID> mrgdSpecifDataKeys)`
`DiscoveryDataBag` `unmarshalGridData(Marshaller marsh, ClassLoader clsLdr, boolean clientNode, IgniteLogger log)`
`DiscoveryDataBag` `unmarshalJoiningNodeData(Marshaller marsh, ClassLoader clsLdr, boolean clientNode, IgniteLogger log)`

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

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

### Constructor Detail

#### DiscoveryDataPacket

    public DiscoveryDataPacket(UUID joiningNodeId)

Parameters:
  `joiningNodeId` - Joining node id.

### Method Detail

#### joiningNodeId

    public UUID joiningNodeId()

#### marshalGridNodeData

    public void marshalGridNodeData(DiscoveryDataBag bag,
                                    UUID nodeId,
                                    Marshaller marsh,
                                    IgniteLogger log)

Parameters:
  `bag` - Bag.
  `nodeId` - Node id.
  `marsh` - Marsh.
  `log` - Logger.

#### marshalJoiningNodeData

    public void marshalJoiningNodeData(DiscoveryDataBag bag,
                                       Marshaller marsh,
                                       IgniteLogger log)

Parameters:
  `bag` - Bag.
  `marsh` - Marsh.
  `log` - Logger.

#### unmarshalGridData

    public DiscoveryDataBag unmarshalGridData(Marshaller marsh,
                                              ClassLoader clsLdr,
                                              boolean clientNode,
                                              IgniteLogger log)

Parameters:
  `marsh` - Marsh.
  `clsLdr` - Class loader.
  `clientNode` - Client node.
  `log` - Logger.

#### unmarshalJoiningNodeData

    public DiscoveryDataBag unmarshalJoiningNodeData(Marshaller marsh,
                                                     ClassLoader clsLdr,
                                                     boolean clientNode,
                                                     IgniteLogger log)

Parameters:
  `marsh` - Marsh.
  `clsLdr` - Class loader.
  `clientNode` - Client node.
  `log` - Logger.

#### hasJoiningNodeData

    public boolean hasJoiningNodeData()

#### hasDataFromNode

    public boolean hasDataFromNode(UUID nodeId)

Parameters:
  `nodeId` - Node id.

#### mergeDataFrom

    public boolean mergeDataFrom(DiscoveryDataPacket existingDataPacket,
                                 Collection<Integer> mrgdCmnDataKeys,
                                 Collection<UUID> mrgdSpecifDataKeys)

Parameters:
  `existingDataPacket` - Existing data packet.
  `mrgdCmnDataKeys` - Mrgd cmn data keys.
  `mrgdSpecifDataKeys` - Mrgd specif data keys.

#### bagForDataCollection

    public DiscoveryDataBag bagForDataCollection()

Returns `DiscoveryDataBag` aware of components with already initialized common data (e.g. on nodes prior in cluster to the one where this method is called).

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018