private void allClustersEqual ( final List < String > clusterUrls ) { Validate . notEmpty ( clusterUrls , "clusterUrls cannot be null" ) ; // If only one clusterUrl return immediately if ( clusterUrls . size ( ) == 1 ) return ; AdminClient adminClientLhs = adminClientPerCluster . get ( clusterUrls . get ( 0 ) ) ; Cluster clusterLhs = adminClientLhs . getAdminClientCluster ( ) ; for ( int index = 1 ; index < clusterUrls . size ( ) ; index ++ ) { AdminClient adminClientRhs = adminClientPerCluster . get ( clusterUrls . get ( index ) ) ; Cluster clusterRhs = adminClientRhs . getAdminClientCluster ( ) ; if ( ! areTwoClustersEqual ( clusterLhs , clusterRhs ) ) throw new VoldemortException ( "Cluster " + clusterLhs . getName ( ) + " is not the same as " + clusterRhs . getName ( ) ) ; } }
Check if all cluster objects in the list are congruent .