apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/environment/PortalMetaDomainConsts.java
private static String selectMetaServerAddress(String metaServerAddresses) {
        String metaAddressSelected = selectedMetaServerAddressCache.get(metaServerAddresses);
        if (metaAddressSelected == null) {
            // initialize
            if (periodicRefreshStarted.compareAndSet(false, true)) {
                schedulePeriodicRefresh();
            }
            updateMetaServerAddresses(metaServerAddresses);
            metaAddressSelected = selectedMetaServerAddressCache.get(metaServerAddresses);
        }

        return metaAddressSelected;
    }
/**
     * Select one available meta server from the comma separated meta server addresses, e.g.
     * http://1.2.3.4:8080,http://2.3.4.5:8080
     *
     * <br />
     *
     * In production environment, we still suggest using one single domain like http://config.xxx.com(backed by software
     * load balancers like nginx) instead of multiple ip addresses
     */
Select one available meta server from the comma separated meta server addresses, e.g.




Select one available meta server from the comma separated meta server addresses e . g .
private static String selectMetaServerAddress(String metaServerAddresses) {
        String metaAddressSelected = selectedMetaServerAddressCache.get(metaServerAddresses);
        if (metaAddressSelected == null) {
            if (periodicRefreshStarted.compareAndSet(false, true)) {
                schedulePeriodicRefresh();
            }
            updateMetaServerAddresses(metaServerAddresses);
            metaAddressSelected = selectedMetaServerAddressCache.get(metaServerAddresses);
        }
        return metaAddressSelected;
    }
private static String selectMetaServerAddress ( String metaServerAddresses ) { String metaAddressSelected = selectedMetaServerAddressCache . get ( metaServerAddresses ) ; if ( metaAddressSelected == null ) { if ( periodicRefreshStarted . compareAndSet ( false , true ) ) { schedulePeriodicRefresh ( ) ; } updateMetaServerAddresses ( metaServerAddresses ) ; metaAddressSelected = selectedMetaServerAddressCache . get ( metaServerAddresses ) ; } return metaAddressSelected ; }
Select one available meta server from the comma separated meta server addresses, e.g.
Select one available meta server from the comma separated meta server addresses e . g .
// initialize