org.apache.ignite.spi.discovery

## Class DiscoveryDataBag

- java.lang.Object
- - org.apache.ignite.spi.discovery.DiscoveryDataBag

    public class DiscoveryDataBag
    extends Object

Provides interface for `GridComponent` to collect and exchange discovery data both on joining node and on cluster nodes. It only organizes interaction with components and doesn't provide any capabilities of converting collected data into formats eligible for transmitting over media (like marshalling, compressing and so on).

### Nested Class Summary

Nested Classes
`static interface` `DiscoveryDataBag.GridDiscoveryData` Facade interface representing `DiscoveryDataBag` object with discovery data collected in the grid.
`static interface` `DiscoveryDataBag.JoiningNodeDiscoveryData` Facade interface representing `DiscoveryDataBag` object with discovery data from joining node.

### Constructor Summary

Constructors
Constructor and Description
`DiscoveryDataBag(UUID joiningNodeId)`
`DiscoveryDataBag(UUID joiningNodeId, Set<Integer> cmnDataInitializedCmps)`

### Method Summary

Methods
`void` `addGridCommonData(Integer cmpId, Serializable data)`
`void` `addJoiningNodeData(Integer cmpId, Serializable data)`
`void` `addNodeSpecificData(Integer cmpId, Serializable data)`
`Map<Integer,Serializable>` `commonData()`
`void` `commonData(Map<Integer,Serializable> cmnData)`
`boolean` `commonDataCollectedFor(Integer cmpId)`
`DiscoveryDataBag.GridDiscoveryData` `gridDiscoveryData(int cmpId)`
`Map<Integer,Serializable>` `joiningNodeData()`
`void` `joiningNodeData(Map<Integer,Serializable> joinNodeData)`
`UUID` `joiningNodeId()`
`Map<Integer,Serializable>` `localNodeSpecificData()`
`DiscoveryDataBag.JoiningNodeDiscoveryData` `newJoinerDiscoveryData(int cmpId)`
`void` `nodeSpecificData(Map<UUID,Map<Integer,Serializable>> nodeSpecData)`

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

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

### Constructor Detail

#### DiscoveryDataBag

    public DiscoveryDataBag(UUID joiningNodeId)

Parameters:
  `joiningNodeId` - Joining node id.

#### DiscoveryDataBag

    public DiscoveryDataBag(UUID joiningNodeId,
                    Set<Integer> cmnDataInitializedCmps)

Parameters:
  `joiningNodeId` - Joining node id.
  `cmnDataInitializedCmps` - Component IDs with already initialized common discovery data.

### Method Detail

#### joiningNodeId

    public UUID joiningNodeId()

#### gridDiscoveryData

    public DiscoveryDataBag.GridDiscoveryData gridDiscoveryData(int cmpId)

Parameters:
  `cmpId` - component ID.

#### newJoinerDiscoveryData

    public DiscoveryDataBag.JoiningNodeDiscoveryData newJoinerDiscoveryData(int cmpId)

Parameters:
  `cmpId` - component ID.

#### addJoiningNodeData

    public void addJoiningNodeData(Integer cmpId,
                          Serializable data)

Parameters:
  `cmpId` - component ID.
  `data` - Data.

#### addGridCommonData

    public void addGridCommonData(Integer cmpId,
                         Serializable data)

Parameters:
  `cmpId` - component ID.
  `data` - Data.

#### addNodeSpecificData

    public void addNodeSpecificData(Integer cmpId,
                           Serializable data)

Parameters:
  `cmpId` - component ID.
  `data` - Data.

#### commonDataCollectedFor

    public boolean commonDataCollectedFor(Integer cmpId)

Parameters:
  `cmpId` - component ID.

#### joiningNodeData

    public void joiningNodeData(Map<Integer,Serializable> joinNodeData)

Parameters:
  `joinNodeData` - Joining node data.

#### commonData

    public void commonData(Map<Integer,Serializable> cmnData)

Parameters:
  `cmnData` - Cmn data.

#### nodeSpecificData

    public void nodeSpecificData(Map<UUID,Map<Integer,Serializable>> nodeSpecData)

Parameters:
  `nodeSpecData` - Node specific data.

#### joiningNodeData

    public Map<Integer,Serializable> joiningNodeData()

#### commonData

    public Map<Integer,Serializable> commonData()

#### localNodeSpecificData

    @Nullable
    public Map<Integer,Serializable> localNodeSpecificData()

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

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