Class ResolverUtils


  • public final class ResolverUtils
    extends java.lang.Object
    • Method Detail

      • splitByZone

        public static java.util.List<AwsEndpoint>[] splitByZone​(java.util.List<AwsEndpoint> eurekaEndpoints,
                                                                java.lang.String myZone)
        Returns:
        returns two element array with first item containing list of endpoints from client's zone, and in the second list all the remaining ones
      • extractZoneFromHostName

        public static java.lang.String extractZoneFromHostName​(java.lang.String hostName)
      • randomize

        public static <T extends EurekaEndpoint> java.util.List<T> randomize​(java.util.List<T> list)
        Randomize server list.
        Returns:
        a copy of the original list with elements in the random order
      • identical

        public static <T extends EurekaEndpoint> boolean identical​(java.util.List<T> firstList,
                                                                   java.util.List<T> secondList)
        Returns:
        true if both list are the same, possibly in a different order