server/src/main/java/com/orientechnologies/orient/server/distributed/OModifiableDistributedConfiguration.java
public List<String> addNewNodeInServerList(final String iNode) {
    synchronized (configuration) {
      final List<String> changedPartitions = new ArrayList<String>();
      // ADD THE NODE IN CONFIGURATION. LOOK FOR $newNode TAG
      for (String clusterName : getClusterNames()) {
        final List<String> partitions = getClusterConfiguration(clusterName).field(SERVERS);
        if (partitions != null) {
          final int newNodePos = partitions.indexOf(OModifiableDistributedConfiguration.NEW_NODE_TAG);
          if (newNodePos > -1 && !partitions.contains(iNode)) {
            partitions.add(newNodePos, iNode);
            changedPartitions.add(clusterName);
          }
        }
      }

      if (!changedPartitions.isEmpty()) {
        // INCREMENT VERSION
        incrementVersion();

        if (!getRegisteredServers().contains(iNode)) {
          if (getNewNodeStrategy() == NEW_NODE_STRATEGIES.STATIC) {
            // REGISTER THE SERVER AS STATIC AND INCREMENT VERSION
            setServerRole(iNode, getServerRole("*"));
          }
        }
        return changedPartitions;
      }
    }
    return null;
  }
public List<String> addNewNodeInServerList(final String iNode) {
    synchronized (configuration) {
      final List<String> changedPartitions = new ArrayList<String>();
      // ADD THE NODE IN CONFIGURATION. LOOK FOR $newNode TAG
      for (String clusterName : getClusterNames()) {
        final List<String> partitions = getClusterConfiguration(clusterName).field(SERVERS);
        if (partitions != null) {
          final int newNodePos = partitions.indexOf(OModifiableDistributedConfiguration.NEW_NODE_TAG);
          if (newNodePos > -1 && !partitions.contains(iNode)) {
            partitions.add(newNodePos, iNode);
            changedPartitions.add(clusterName);
          }
        }
      }

      if (!changedPartitions.isEmpty()) {
        // INCREMENT VERSION
        incrementVersion();

        if (!getRegisteredServers().contains(iNode)) {
          if (getNewNodeStrategy() == NEW_NODE_STRATEGIES.STATIC) {
            // REGISTER THE SERVER AS STATIC AND INCREMENT VERSION
            setServerRole(iNode, getServerRole("*"));
          }
        }
        return changedPartitions;
      }
    }
    return null;
  }
public List < String > addNewNodeInServerList ( final String iNode ) { synchronized ( configuration ) { final List < String > changedPartitions = new ArrayList < String > ( ) ; // ADD THE NODE IN CONFIGURATION. LOOK FOR $newNode TAG for ( String clusterName : getClusterNames ( ) ) { final List < String > partitions = getClusterConfiguration ( clusterName ) . field ( SERVERS ) ; if ( partitions != null ) { final int newNodePos = partitions . indexOf ( OModifiableDistributedConfiguration . NEW_NODE_TAG ) ; if ( newNodePos > - 1 && ! partitions . contains ( iNode ) ) { partitions . add ( newNodePos , iNode ) ; changedPartitions . add ( clusterName ) ; } } } if ( ! changedPartitions . isEmpty ( ) ) { // INCREMENT VERSION incrementVersion ( ) ; if ( ! getRegisteredServers ( ) . contains ( iNode ) ) { if ( getNewNodeStrategy ( ) == NEW_NODE_STRATEGIES . STATIC ) { // REGISTER THE SERVER AS STATIC AND INCREMENT VERSION setServerRole ( iNode , getServerRole ( "*" ) ) ; } } return changedPartitions ; } } return null ; }
Adds a server in the configuration. It replaces all the tags &lt;NEW_NODE&gt; with the new server name<br>
NOTE: It must be executed in distributed database lock.

@param iNode
Server name
@return the list of changed partitions or null if no changes have applied
Adds a server in the configuration . It replaces all the tags &lt ; NEW_NODE&gt ; with the new server name<br > NOTE : It must be executed in distributed database lock .