congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
EndpointUtils.getServiceUrlsMapFromConfig
Code IndexAdd Tabnine to your IDE (free)

How to use
getServiceUrlsMapFromConfig
method
in
com.netflix.discovery.endpoint.EndpointUtils

Best Java code snippets using com.netflix.discovery.endpoint.EndpointUtils.getServiceUrlsMapFromConfig (Showing top 2 results out of 315)

origin: Netflix/eureka

private List<AwsEndpoint> getClusterEndpointsFromConfig() {
  String[] availZones = clientConfig.getAvailabilityZones(clientConfig.getRegion());
  String myZone = InstanceInfo.getZone(availZones, myInstanceInfo);
  Map<String, List<String>> serviceUrls = EndpointUtils
      .getServiceUrlsMapFromConfig(clientConfig, myZone, clientConfig.shouldPreferSameZoneEureka());
  List<AwsEndpoint> endpoints = new ArrayList<>();
  for (String zone : serviceUrls.keySet()) {
    for (String url : serviceUrls.get(zone)) {
      try {
        endpoints.add(new AwsEndpoint(url, getRegion(), zone));
      } catch (Exception ignore) {
        logger.warn("Invalid eureka server URI: {}; removing from the server pool", url);
      }
    }
  }
  logger.debug("Config resolved to {}", endpoints);
  if (endpoints.isEmpty()) {
    logger.error("Cannot resolve to any endpoints from provided configuration: {}", serviceUrls);
  }
  return endpoints;
}
origin: com.netflix.eureka/eureka-client

private List<AwsEndpoint> getClusterEndpointsFromConfig() {
  String[] availZones = clientConfig.getAvailabilityZones(clientConfig.getRegion());
  String myZone = InstanceInfo.getZone(availZones, myInstanceInfo);
  Map<String, List<String>> serviceUrls = EndpointUtils
      .getServiceUrlsMapFromConfig(clientConfig, myZone, clientConfig.shouldPreferSameZoneEureka());
  List<AwsEndpoint> endpoints = new ArrayList<>();
  for (String zone : serviceUrls.keySet()) {
    for (String url : serviceUrls.get(zone)) {
      try {
        endpoints.add(new AwsEndpoint(url, getRegion(), zone));
      } catch (Exception ignore) {
        logger.warn("Invalid eureka server URI: {}; removing from the server pool", url);
      }
    }
  }
  logger.debug("Config resolved to {}", endpoints);
  if (endpoints.isEmpty()) {
    logger.error("Cannot resolve to any endpoints from provided configuration: {}", serviceUrls);
  }
  return endpoints;
}
com.netflix.discovery.endpointEndpointUtilsgetServiceUrlsMapFromConfig

Javadoc

Get the list of all eureka service urls from properties file for the eureka client to talk to.

Popular methods of EndpointUtils

  • getDiscoveryServiceUrls
    Get the list of all eureka service urls for the eureka client to talk to.
  • getServiceUrlsFromDNS
    Get the list of all eureka service urls from DNS for the eureka client to talk to. The client picks
  • getEC2DiscoveryUrlsFromZone
    Get the list of EC2 URLs given the zone name.
  • getRegion
    Get the region that this particular instance is in.
  • getServiceUrlsFromConfig
    Get the list of all eureka service urls from properties file for the eureka client to talk to.
  • getZoneBasedDiscoveryUrlsFromRegion
    Get the zone based CNAMES that are bound to a region.
  • getZoneOffset
    Gets the zone to pick up for this instance.
  • isEC2Url

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JTable (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now