Class SrvResolverOptions
java.lang.Object
io.vertx.serviceresolver.ServiceResolverOptions
io.vertx.serviceresolver.srv.SrvResolverOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SocketAddressstatic final intstatic final TimeUnit -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintsetMinTTL(int minTTL) Set the minimum amount of time inunit of timethe resolver caches DNS responses, the default value is0setMinTTLUnit(TimeUnit minTTLUnit) Set the unit ofsetMinTTL(int), the default value isTimeUnit.SECONDS.setServer(SocketAddress server) Set the DNS resolver address.
-
Field Details
-
DEFAULT_SERVER
-
MIN_TTL
public static final int MIN_TTL- See Also:
-
MIN_TTL_UNIT
-
-
Constructor Details
-
SrvResolverOptions
public SrvResolverOptions() -
SrvResolverOptions
-
SrvResolverOptions
-
-
Method Details
-
getServer
- Returns:
- the DNS resolver address
-
setServer
Set the DNS resolver address.- Parameters:
server- the resolver address- Returns:
- this options instance
-
getMinTTL
public int getMinTTL()- Returns:
- the minimum amount of time in
unit of timethe resolver caches DNS responses.
-
setMinTTL
Set the minimum amount of time in
unit of timethe resolver caches DNS responses, the default value is0This overrides the DNS packet TTL when the value is too small or not cached to ensure caching occurs in the resolver.
- Parameters:
minTTL- the minimum amount of time the resolver caches DNS responses- Returns:
- this options instance
-
getMinTTLUnit
- Returns:
- the unit of
setMinTTL(int).
-
setMinTTLUnit
Set the unit ofsetMinTTL(int), the default value isTimeUnit.SECONDS.- Parameters:
minTTLUnit- the unit- Returns:
- this options instance
-