private void doLoadHealthServices(final String serviceNameToFetch) {

        try {
            final List<EndpointDefinition> healthyServices = provider.loadServices(serviceNameToFetch);
            populateServiceMap(serviceNameToFetch, healthyServices);
        } catch (Exception ex) {
            doFailOverHealthServicesLoad(serviceNameToFetch, ex);
        } finally {
            /*  Remove the service from the serviceNamesBeingLoaded
                SET and add it back to the work pool
                to get loaded again.
                 We are constantly loading services through long polling for changes.
             */
            serviceNamesBeingLoaded.remove(serviceNameToFetch);
        }

    }
private void doLoadHealthServices(final String serviceNameToFetch) {

        try {
            final List<EndpointDefinition> healthyServices = provider.loadServices(serviceNameToFetch);
            populateServiceMap(serviceNameToFetch, healthyServices);
        } catch (Exception ex) {
            doFailOverHealthServicesLoad(serviceNameToFetch, ex);
        } finally {
            
            serviceNamesBeingLoaded.remove(serviceNameToFetch);
        }

    }
private void doLoadHealthServices ( final String serviceNameToFetch ) { try { final List < EndpointDefinition > healthyServices = provider . loadServices ( serviceNameToFetch ) ; populateServiceMap ( serviceNameToFetch , healthyServices ) ; } catch ( Exception ex ) { doFailOverHealthServicesLoad ( serviceNameToFetch , ex ) ; } finally { /*  Remove the service from the serviceNamesBeingLoaded
                SET and add it back to the work pool
                to get loaded again.
                 We are constantly loading services through long polling for changes.
             */ serviceNamesBeingLoaded . remove ( serviceNameToFetch ) ; } }
Loads the service from the remote service registry (i.e., consul).

@param serviceNameToFetch service that we are loading a pool for.
Loads the service from the remote service registry ( i . e . consul ) .