src/main/java/com/spotify/dns/DnsSrvWatchers.java
public static <T> DnsSrvWatcherBuilder<T> newBuilder(
      DnsSrvResolver resolver,
      Function<LookupResult, T> resultTransformer) {

    checkNotNull(resolver, "resolver");
    checkNotNull(resultTransformer, "resultTransformer");

    return new DnsSrvWatcherBuilder<T>(resolver, resultTransformer);
  }
public static <T> DnsSrvWatcherBuilder<T> newBuilder(
      DnsSrvResolver resolver,
      Function<LookupResult, T> resultTransformer) {

    checkNotNull(resolver, "resolver");
    checkNotNull(resultTransformer, "resultTransformer");

    return new DnsSrvWatcherBuilder<T>(resolver, resultTransformer);
  }
Creates a {@link DnsSrvWatcherBuilder} using the given {@link DnsSrvResolver}. The builder
can be configured to have the desired behavior.

<p>This watcher will use a function that transforms the {@link LookupResult}s into an
arbitrary type that will be used throughout the {@link DnsSrvWatcher} api.

<p>Exactly one of {@link DnsSrvWatcherBuilder#polling(long, TimeUnit)} or
{@link DnsSrvWatcherBuilder#customTrigger(DnsSrvWatcherFactory)} must be used.

@param resolver          The resolver to use for lookups
@param resultTransformer The transformer function
@return a builder for further configuring the watcher