Package com.spotify.dns
Class DnsSrvWatchers
- java.lang.Object
-
- com.spotify.dns.DnsSrvWatchers
-
public final class DnsSrvWatchers extends Object
Provides builders for configuring and instantiatingDnsSrvWatchers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDnsSrvWatchers.DnsSrvWatcherBuilder<T>
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DnsSrvWatchers.DnsSrvWatcherBuilder<LookupResult>newBuilder(DnsSrvResolver resolver)Creates aDnsSrvWatchers.DnsSrvWatcherBuilderusing the givenDnsSrvResolver.static <T> DnsSrvWatchers.DnsSrvWatcherBuilder<T>newBuilder(DnsSrvResolver resolver, com.google.common.base.Function<LookupResult,T> resultTransformer)Deprecated.UsenewBuilder(DnsSrvResolver, java.util.function.Function)deprecated since version 3.2.0static <T> DnsSrvWatchers.DnsSrvWatcherBuilder<T>newBuilder(DnsSrvResolver resolver, Function<LookupResult,T> resultTransformer)Creates aDnsSrvWatchers.DnsSrvWatcherBuilderusing the givenDnsSrvResolver.
-
-
-
Method Detail
-
newBuilder
public static DnsSrvWatchers.DnsSrvWatcherBuilder<LookupResult> newBuilder(DnsSrvResolver resolver)
Creates aDnsSrvWatchers.DnsSrvWatcherBuilderusing the givenDnsSrvResolver. The builder can be configured to have the desired behavior.Exactly one of
DnsSrvWatchers.DnsSrvWatcherBuilder.polling(long, TimeUnit)orDnsSrvWatchers.DnsSrvWatcherBuilder.customTrigger(DnsSrvWatcherFactory)must be used.- Parameters:
resolver- The resolver to use for lookups- Returns:
- a builder for further configuring the watcher
-
newBuilder
public static <T> DnsSrvWatchers.DnsSrvWatcherBuilder<T> newBuilder(DnsSrvResolver resolver, Function<LookupResult,T> resultTransformer)
Creates aDnsSrvWatchers.DnsSrvWatcherBuilderusing the givenDnsSrvResolver. The builder can be configured to have the desired behavior.This watcher will use a function that transforms the
LookupResults into an arbitrary type that will be used throughout theDnsSrvWatcherapi.Exactly one of
DnsSrvWatchers.DnsSrvWatcherBuilder.polling(long, TimeUnit)orDnsSrvWatchers.DnsSrvWatcherBuilder.customTrigger(DnsSrvWatcherFactory)must be used.- Parameters:
resolver- The resolver to use for lookupsresultTransformer- The transformer function- Returns:
- a builder for further configuring the watcher
-
newBuilder
public static <T> DnsSrvWatchers.DnsSrvWatcherBuilder<T> newBuilder(DnsSrvResolver resolver, com.google.common.base.Function<LookupResult,T> resultTransformer)
Deprecated.UsenewBuilder(DnsSrvResolver, java.util.function.Function)deprecated since version 3.2.0
-
-