Tabnine Logo
EndpointUtils.getServiceUrlsFromConfig
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: Netflix/eureka

/**
 * @deprecated use {@link #getServiceUrlsFromConfig(String, boolean)} instead.
 */
@Deprecated
public static List<String> getEurekaServiceUrlsFromConfig(String instanceZone, boolean preferSameZone) {
  return EndpointUtils.getServiceUrlsFromConfig(staticClientConfig, instanceZone, preferSameZone);
}
origin: Netflix/eureka

/**
 * @deprecated see replacement in {@link com.netflix.discovery.endpoint.EndpointUtils}
 *
 * Get the list of all eureka service urls from properties file for the eureka client to talk to.
 *
 * @param instanceZone The zone in which the client resides
 * @param preferSameZone true if we have to prefer the same zone as the client, false otherwise
 * @return The list of all eureka service urls for the eureka client to talk to
 */
@Deprecated
@Override
public List<String> getServiceUrlsFromConfig(String instanceZone, boolean preferSameZone) {
  return EndpointUtils.getServiceUrlsFromConfig(clientConfig, instanceZone, preferSameZone);
}
origin: Netflix/eureka

  private List<AwsEndpoint> createEurekaEndpointsFromConfig() {
    List<String> serviceUrls = EndpointUtils.getServiceUrlsFromConfig(clientConfig, myZone, clientConfig.shouldPreferSameZoneEureka());
    List<AwsEndpoint> endpoints = new ArrayList<>(serviceUrls.size());
    for (String serviceUrl : serviceUrls) {
      try {
        URI serviceURI = new URI(serviceUrl);
        endpoints.add(new AwsEndpoint(
            serviceURI.getHost(),
            serviceURI.getPort(),
            "https".equalsIgnoreCase(serviceURI.getSchemeSpecificPart()),
            serviceURI.getPath(),
            myRegion,
            myZone
        ));
      } catch (URISyntaxException ignore) {
        logger.warn("Invalid eureka server URI: {}; removing from the server pool", serviceUrl);
      }
    }
    return endpoints;
  }
}
origin: Netflix/eureka

/**
 * Get the list of all eureka service urls for the eureka client to talk to.
 *
 * @param clientConfig the clientConfig to use
 * @param zone the zone in which the client resides
 * @param randomizer a randomizer to randomized returned urls, if loading from dns
 *
 * @return The list of all eureka service urls for the eureka client to talk to.
 */
public static List<String> getDiscoveryServiceUrls(EurekaClientConfig clientConfig, String zone, ServiceUrlRandomizer randomizer) {
  boolean shouldUseDns = clientConfig.shouldUseDnsForFetchingServiceUrls();
  if (shouldUseDns) {
    return getServiceUrlsFromDNS(clientConfig, zone, clientConfig.shouldPreferSameZoneEureka(), randomizer);
  }
  return getServiceUrlsFromConfig(clientConfig, zone, clientConfig.shouldPreferSameZoneEureka());
}
origin: com.netflix.eureka/eureka-client

/**
 * @deprecated use {@link #getServiceUrlsFromConfig(String, boolean)} instead.
 */
@Deprecated
public static List<String> getEurekaServiceUrlsFromConfig(String instanceZone, boolean preferSameZone) {
  return EndpointUtils.getServiceUrlsFromConfig(staticClientConfig, instanceZone, preferSameZone);
}
origin: com.netflix.eureka/eureka-client

/**
 * @deprecated see replacement in {@link com.netflix.discovery.endpoint.EndpointUtils}
 *
 * Get the list of all eureka service urls from properties file for the eureka client to talk to.
 *
 * @param instanceZone The zone in which the client resides
 * @param preferSameZone true if we have to prefer the same zone as the client, false otherwise
 * @return The list of all eureka service urls for the eureka client to talk to
 */
@Deprecated
@Override
public List<String> getServiceUrlsFromConfig(String instanceZone, boolean preferSameZone) {
  return EndpointUtils.getServiceUrlsFromConfig(clientConfig, instanceZone, preferSameZone);
}
origin: com.netflix.eureka/eureka-client

  private List<AwsEndpoint> createEurekaEndpointsFromConfig() {
    List<String> serviceUrls = EndpointUtils.getServiceUrlsFromConfig(clientConfig, myZone, clientConfig.shouldPreferSameZoneEureka());
    List<AwsEndpoint> endpoints = new ArrayList<>(serviceUrls.size());
    for (String serviceUrl : serviceUrls) {
      try {
        URI serviceURI = new URI(serviceUrl);
        endpoints.add(new AwsEndpoint(
            serviceURI.getHost(),
            serviceURI.getPort(),
            "https".equalsIgnoreCase(serviceURI.getSchemeSpecificPart()),
            serviceURI.getPath(),
            myRegion,
            myZone
        ));
      } catch (URISyntaxException ignore) {
        logger.warn("Invalid eureka server URI: {}; removing from the server pool", serviceUrl);
      }
    }
    return endpoints;
  }
}
origin: com.netflix.eureka/eureka-client

/**
 * Get the list of all eureka service urls for the eureka client to talk to.
 *
 * @param clientConfig the clientConfig to use
 * @param zone the zone in which the client resides
 * @param randomizer a randomizer to randomized returned urls, if loading from dns
 *
 * @return The list of all eureka service urls for the eureka client to talk to.
 */
public static List<String> getDiscoveryServiceUrls(EurekaClientConfig clientConfig, String zone, ServiceUrlRandomizer randomizer) {
  boolean shouldUseDns = clientConfig.shouldUseDnsForFetchingServiceUrls();
  if (shouldUseDns) {
    return getServiceUrlsFromDNS(clientConfig, zone, clientConfig.shouldPreferSameZoneEureka(), randomizer);
  }
  return getServiceUrlsFromConfig(clientConfig, zone, clientConfig.shouldPreferSameZoneEureka());
}
com.netflix.discovery.endpointEndpointUtilsgetServiceUrlsFromConfig

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.
  • getServiceUrlsMapFromConfig
    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
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Best plugins for Eclipse
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