server/src/main/java/com/orientechnologies/orient/server/distributed/OModifiableDistributedConfiguration.java
public List<String> setServerOffline(final String iNode, final String newLockManagerServer) {
    final List<String> changedPartitions = new ArrayList<String>();

    final String[] clusters = getClusterNames();
    synchronized (configuration) {
      for (String clusterName : clusters) {
        final List<String> nodes = getClusterConfiguration(clusterName).field(SERVERS);
        if (nodes != null && nodes.size() > 1) {
          for (String node : nodes) {
            if (node.equals(iNode)) {
              // FOUND: PUT THE NODE AT THE END (BEFORE ANY TAG <NEW_NODE>)
              nodes.remove(node);

              final boolean newNodeRemoved = nodes.remove(NEW_NODE_TAG);

              nodes.add(node);

              if (newNodeRemoved)
                // REINSERT NEW NODE TAG AT THE END
                nodes.add(NEW_NODE_TAG);

              if (newLockManagerServer != null) {
                // ASSURE THE NEW LOCK MANAGER IS THE FIRST IN THE LIST
                if (nodes.remove(newLockManagerServer))
                  nodes.add(0, newLockManagerServer);
              }

              changedPartitions.add(clusterName);
              break;
            }
          }
        }
      }

      if (!changedPartitions.isEmpty()) {
        incrementVersion();
        return changedPartitions;
      }
    }
    return null;
  }
public List<String> setServerOffline(final String iNode, final String newLockManagerServer) {
    final List<String> changedPartitions = new ArrayList<String>();

    final String[] clusters = getClusterNames();
    synchronized (configuration) {
      for (String clusterName : clusters) {
        final List<String> nodes = getClusterConfiguration(clusterName).field(SERVERS);
        if (nodes != null && nodes.size() > 1) {
          for (String node : nodes) {
            if (node.equals(iNode)) {
              // FOUND: PUT THE NODE AT THE END (BEFORE ANY TAG <NEW_NODE>)
              nodes.remove(node);

              final boolean newNodeRemoved = nodes.remove(NEW_NODE_TAG);

              nodes.add(node);

              if (newNodeRemoved)
                // REINSERT NEW NODE TAG AT THE END
                nodes.add(NEW_NODE_TAG);

              if (newLockManagerServer != null) {
                // ASSURE THE NEW LOCK MANAGER IS THE FIRST IN THE LIST
                if (nodes.remove(newLockManagerServer))
                  nodes.add(0, newLockManagerServer);
              }

              changedPartitions.add(clusterName);
              break;
            }
          }
        }
      }

      if (!changedPartitions.isEmpty()) {
        incrementVersion();
        return changedPartitions;
      }
    }
    return null;
  }
Set a server offline. It assures the offline server is never on top of the list.<br>
NOTE: It must be executed in distributed database lock.

@param iNode
Server name
@param newLockManagerServer
New Lock Manager server name
@return