public String getClusterOwner(final String iClusterName) {
    String owner;

    final ODocument clusters = getConfiguredClusters();

    // GET THE CLUSTER CFG
    final ODocument cfg = iClusterName != null ? (ODocument) clusters.field(iClusterName) : null;

    if (cfg != null) {
      owner = cfg.field(OWNER);
      if (owner != null)
        return owner;

      final List<String> serverList = cfg.field(SERVERS);
      if (serverList != null && !serverList.isEmpty()) {
        // RETURN THE FIRST ONE
        owner = serverList.get(0);
        if (NEW_NODE_TAG.equals(owner) && serverList.size() > 1)
          // DON'T RETURN <NEW_NODE>
          owner = serverList.get(1);
      }
    } else
      // RETURN THE OWNER OF *
      return getClusterOwner(ALL_WILDCARD);

    return owner;
  }
public String getClusterOwner ( final String iClusterName ) { String owner ; final ODocument clusters = getConfiguredClusters ( ) ; final ODocument cfg = iClusterName != null ? ( ODocument ) clusters . field ( iClusterName ) : null ; if ( cfg != null ) { owner = cfg . field ( OWNER ) ; if ( owner != null ) return owner ; final List < String > serverList = cfg . field ( SERVERS ) ; if ( serverList != null && ! serverList . isEmpty ( ) ) { owner = serverList . get ( 0 ) ; if ( NEW_NODE_TAG . equals ( owner ) && serverList . size ( ) > 1 ) owner = serverList . get ( 1 ) ; } } else return getClusterOwner ( ALL_WILDCARD ) ; return owner ; }
Returns the owner server for the given cluster excluding the passed node. The Owner server is the first in server list.

@param iClusterName Cluster name, or null for *