public void restoreTopology(Iterable<TcpDiscoveryNode> nodes,long topVer){
  assert !F.isEmpty(nodes);
  assert topVer > 0;
  rwLock.writeLock().lock();
  try {
    locNode.internalOrder(topVer);
    clear();
    boolean firstAdd=true;
    for (    TcpDiscoveryNode node : nodes) {
      if (nodesMap.containsKey(node.id()))       continue;
      nodesMap.put(node.id(),node);
      if (firstAdd) {
        this.nodes=new TreeSet<>(this.nodes);
        firstAdd=false;
      }
      node.lastUpdateTime(U.currentTimeMillis());
      this.nodes.add(node);
    }
    nodeOrder=topVer;
    initializeMinimumVersion();
  }
  finally {
    rwLock.writeLock().unlock();
  }
}

public void restoreTopology ( Iterable < TcpDiscoveryNode > nodes , long topVer ) { assert ! F . isEmpty ( nodes ) ; assert topVer > 0 ; rwLock . writeLock ( ) . lock ( ) ; try { locNode . internalOrder ( topVer ) ; clear ( ) ; boolean firstAdd = true ; for ( TcpDiscoveryNode node : nodes ) { if ( nodesMap . containsKey ( node . id ( ) ) ) continue ; nodesMap . put ( node . id ( ) , node ) ; if ( firstAdd ) { this . nodes = new TreeSet < > ( this . nodes ) ; firstAdd = false ; } node . lastUpdateTime ( U . currentTimeMillis ( ) ) ; this . nodes . add ( node ) ; } nodeOrder = topVer ; initializeMinimumVersion ( ) ; } finally { rwLock . writeLock ( ) . unlock ( ) ; } }
restores topology from parameters values . < p > this method is called when new node receives topology from coordinator . in this case all nodes received are remote for local . < p > also initializes nodes last update time with current system time .
