org.apache.ignite.internal.managers.discovery

## Class GridDiscoveryTopologySnapshot

- java.lang.Object
- - org.apache.ignite.internal.managers.discovery.GridDiscoveryTopologySnapshot

    public class GridDiscoveryTopologySnapshot
    extends Object

Topology snapshot managed by discovery manager.

### Constructor Summary

Constructors
Constructor and Description
`GridDiscoveryTopologySnapshot(long topVer, Collection<ClusterNode> topNodes)` Creates a topology snapshot with given topology version and topology nodes.

### Method Summary

All Methods Instance Methods Concrete Methods
`Collection<ClusterNode>` `topologyNodes()` Gets topology nodes from topology snapshot.
`long` `topologyVersion()` Gets topology version if this event is raised on topology change and configured discovery SPI implementation supports topology versioning.
`String` `toString()`

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

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

### Constructor Detail

#### GridDiscoveryTopologySnapshot

    public GridDiscoveryTopologySnapshot(long topVer,
                                         Collection<ClusterNode> topNodes)

Creates a topology snapshot with given topology version and topology nodes.

Parameters:
  `topVer` - Topology version.
  `topNodes` - Topology nodes.

### Method Detail

#### topologyVersion

    public long topologyVersion()

Gets topology version if this event is raised on topology change and configured discovery SPI implementation supports topology versioning.

Returns:
  Topology version or `0` if configured discovery SPI implementation does not support versioning.

#### topologyNodes

    public Collection<ClusterNode> topologyNodes()

Gets topology nodes from topology snapshot. If SPI implementation does not support versioning, the best effort snapshot will be captured.

Returns:
  Topology snapshot.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018