org.apache.ignite.spi.discovery

## Interface DiscoverySpiListener

    public interface DiscoverySpiListener

Listener for grid node discovery events. See `DiscoverySpi` for information on how grid nodes get discovered.

### Method Summary

All Methods Instance Methods Abstract Methods
`IgniteFuture<?>` `onDiscovery(int type, long topVer, ClusterNode node, Collection<ClusterNode> topSnapshot, @Nullable Map<Long,Collection<ClusterNode>> topHist, @Nullable DiscoverySpiCustomMessage data)` Notification for grid node discovery events.
`void` `onLocalNodeInitialized(ClusterNode locNode)` Notification of local node initialization.

### Method Detail

#### onLocalNodeInitialized

    void onLocalNodeInitialized(ClusterNode locNode)

Notification of local node initialization. At the time this method is called, it is guaranteed that local node consistent ID is available, but the discovery process is not started yet. This method should not block for a long time since it blocks discovery.

Parameters:
  `locNode` - Initialized local node.

#### onDiscovery

    IgniteFuture<?> onDiscovery(int type,
                                long topVer,
                                ClusterNode node,
                                Collection<ClusterNode> topSnapshot,
                                @Nullable
                                @Nullable Map<Long,Collection<ClusterNode>> topHist,
                                @Nullable
                                @Nullable DiscoverySpiCustomMessage data)

Notification for grid node discovery events.

Parameters:
  `type` - Node discovery event type. See `DiscoveryEvent`
  `topVer` - Topology version or `0` if configured discovery SPI implementation does not support versioning.
  `node` - Node affected (e.g. newly joined node, left node, failed node or local node).
  `topSnapshot` - Topology snapshot after event has been occurred (e.g. if event is `EVT_NODE_JOINED`, then joined node will be in snapshot).
  `topHist` - Topology snapshots history.
  `data` - Data for custom event.
Returns:
  A future that will be completed when notification process has finished.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.1
Release Date | : May 21 2020