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).
`void` `clearUnmarshalledJoiningNodeData()` Clears `unmarshalledJoiningNodeData`
`boolean` `hasDataFromNode(UUID nodeId)`
`boolean` `hasJoiningNodeData()`
`boolean` `isJoiningDataZipped()`
`void` `joiningNodeClient(boolean joiningNodeClient)`
`UUID` `joiningNodeId()`
`void` `marshalGridNodeData(DiscoveryDataBag bag, UUID nodeId, Marshaller marsh, boolean isCompressionEnabled, int compressionLevel, IgniteLogger log)`
`void` `marshalJoiningNodeData(DiscoveryDataBag bag, Marshaller marsh, boolean isCompressionEnabled, int compressionLevel, 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)`
`DiscoveryDataBag` `unmarshalJoiningNodeDataSilently(Marshaller marsh, ClassLoader clsLdr, boolean clientNode, IgniteLogger log)`
`void` `unzipData(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,
                                    boolean isCompressionEnabled,
                                    int compressionLevel,
                                    IgniteLogger log)

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

#### marshalJoiningNodeData

    public void marshalJoiningNodeData(DiscoveryDataBag bag,
                                       Marshaller marsh,
                                       boolean isCompressionEnabled,
                                       int compressionLevel,
                                       IgniteLogger log)

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

#### isJoiningDataZipped

    public boolean isJoiningDataZipped()

Returns:
  `true` if joining node data was transferred via network in zipped format.

#### unmarshalGridData

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

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

#### unmarshalJoiningNodeData

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

Parameters:
  `marsh` - Marsh.
  `clsLdr` - Class loader.
  `clientNode` - Client node.
  `log` - Logger.
Throws:
  `IgniteCheckedException` - If unmarshalling failed.

#### unmarshalJoiningNodeDataSilently

    public DiscoveryDataBag unmarshalJoiningNodeDataSilently(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.

#### unzipData

    public void unzipData(IgniteLogger log)

Parameters:
  `log` - Logger.

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

#### joiningNodeClient

    public void joiningNodeClient(boolean joiningNodeClient)

Parameters:
  `joiningNodeClient` - Joining node is client flag.

#### clearUnmarshalledJoiningNodeData

    public void clearUnmarshalledJoiningNodeData()

Clears `unmarshalledJoiningNodeData`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

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