code: @Nullable @Override
      public synchronized Host getHost() {
          for (Integer priority : priorities) {
              IteratingHostProvider iteratingHostProvider = hosts.get(priority);
              if (iteratingHostProvider!=null) { //this could only be null if we had a synchronization problem or a bug.
                  Host host = iteratingHostProvider.getHost();
                  if (host!=null) return host;
              }
          }
          return null;
      }
docs: This impl returns the next host in the list on each call by iterating the list of hosts.
  If the list only contains one, then all calls return that.