server/src/main/java/com/orientechnologies/orient/server/distributed/OModifiableDistributedConfiguration.java
public void setServerRole(final String iServerName, final ROLES role) {
    synchronized (configuration) {
      ODocument servers = configuration.field(SERVERS);
      if (servers == null) {
        servers = new ODocument();
        configuration.field(SERVERS, servers, OType.EMBEDDED);
      }

      servers.field(iServerName, role);
      incrementVersion();
    }
  }
public void setServerRole(final String iServerName, final ROLES role) {
    synchronized (configuration) {
      ODocument servers = configuration.field(SERVERS);
      if (servers == null) {
        servers = new ODocument();
        configuration.field(SERVERS, servers, OType.EMBEDDED);
      }

      servers.field(iServerName, role);
      incrementVersion();
    }
  }
public void setServerRole ( final String iServerName , final ROLES role ) { synchronized ( configuration ) { ODocument servers = configuration . field ( SERVERS ) ; if ( servers == null ) { servers = new ODocument ( ) ; configuration . field ( SERVERS , servers , OType . EMBEDDED ) ; } servers . field ( iServerName , role ) ; incrementVersion ( ) ; } }
Sets the server role between MASTER (default) and REPLICA.
Sets the server role between MASTER ( default ) and REPLICA .