public boolean isServerContainingAllClusters ( final String server , Collection < String > clusters ) { if ( clusters == null || clusters . isEmpty ( ) ) clusters = DEFAULT_CLUSTER_NAME ; for ( String cluster : clusters ) { final List < String > serverList = getClusterConfiguration ( cluster ) . field ( SERVERS ) ; if ( serverList != null ) { if ( ! serverList . contains ( server ) ) return false ; } } return true ; }
Returns true if the local server has all the requested clusters .