private void doFailOverHealthServicesLoad(final String serviceNameToFetch, Exception ex) {

        /* If there is a backup provider, load from there. */
        if (backupProvider != null) {

            if (debug) logger.debug("ServiceDiscoveryImpl::loadHealthyServices " +
                    "Error while loading healthy" +
                    " services for " + serviceNameToFetch, ex);

            final List<EndpointDefinition> healthyServices = backupProvider.loadServices(serviceNameToFetch);
            populateServiceMap(serviceNameToFetch, healthyServices);
            serviceNamesBeingLoaded.remove(serviceNameToFetch);

        } else {

            logger.error("ServiceDiscoveryImpl::loadHealthyServices " +
                    "Error while loading healthy" +
                    " services for " + serviceNameToFetch, ex);
        }

        Sys.sleep(10_000); //primary is down so slow it down so we don't flow the system with updates of service pools.

    }
private void doFailOverHealthServicesLoad(final String serviceNameToFetch, Exception ex) {

        
        if (backupProvider != null) {

            if (debug) logger.debug("ServiceDiscoveryImpl::loadHealthyServices " +
                    "Error while loading healthy" +
                    " services for " + serviceNameToFetch, ex);

            final List<EndpointDefinition> healthyServices = backupProvider.loadServices(serviceNameToFetch);
            populateServiceMap(serviceNameToFetch, healthyServices);
            serviceNamesBeingLoaded.remove(serviceNameToFetch);

        } else {

            logger.error("ServiceDiscoveryImpl::loadHealthyServices " +
                    "Error while loading healthy" +
                    " services for " + serviceNameToFetch, ex);
        }

        Sys.sleep(10_000); 

    }
private void doFailOverHealthServicesLoad ( final String serviceNameToFetch , Exception ex ) { /* If there is a backup provider, load from there. */ if ( backupProvider != null ) { if ( debug ) logger . debug ( "ServiceDiscoveryImpl::loadHealthyServices " + "Error while loading healthy" + " services for " + serviceNameToFetch , ex ) ; final List < EndpointDefinition > healthyServices = backupProvider . loadServices ( serviceNameToFetch ) ; populateServiceMap ( serviceNameToFetch , healthyServices ) ; serviceNamesBeingLoaded . remove ( serviceNameToFetch ) ; } else { logger . error ( "ServiceDiscoveryImpl::loadHealthyServices " + "Error while loading healthy" + " services for " + serviceNameToFetch , ex ) ; } Sys . sleep ( 10_000 ) ; //primary is down so slow it down so we don't flow the system with updates of service pools. }
If the primary load failed, we could have a backup provider registered.

@param serviceNameToFetch service pool to fetch
@param ex
If the primary load failed we could have a backup provider registered .