Package io.vertx.serviceresolver.srv
Class SrvResolverOptions
- java.lang.Object
-
- io.vertx.serviceresolver.ServiceResolverOptions
-
- io.vertx.serviceresolver.srv.SrvResolverOptions
-
public class SrvResolverOptions extends ServiceResolverOptions
-
-
Field Summary
Fields Modifier and Type Field Description static SocketAddressDEFAULT_SERVERstatic intMIN_TTLstatic TimeUnitMIN_TTL_UNIT
-
Constructor Summary
Constructors Constructor Description SrvResolverOptions()SrvResolverOptions(JsonObject json)SrvResolverOptions(SrvResolverOptions other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMinTTL()TimeUnitgetMinTTLUnit()SocketAddressgetServer()SrvResolverOptionssetMinTTL(int minTTL)Set the minimum amount of time inunit of timethe resolver caches DNS responses, the default value is0SrvResolverOptionssetMinTTLUnit(TimeUnit minTTLUnit)Set the unit ofsetMinTTL(int), the default value isTimeUnit.SECONDS.SrvResolverOptionssetServer(SocketAddress server)Set the DNS resolver address.
-
-
-
Field Detail
-
DEFAULT_SERVER
public static final SocketAddress DEFAULT_SERVER
-
MIN_TTL
public static final int MIN_TTL
- See Also:
- Constant Field Values
-
MIN_TTL_UNIT
public static final TimeUnit MIN_TTL_UNIT
-
-
Constructor Detail
-
SrvResolverOptions
public SrvResolverOptions()
-
SrvResolverOptions
public SrvResolverOptions(SrvResolverOptions other)
-
SrvResolverOptions
public SrvResolverOptions(JsonObject json)
-
-
Method Detail
-
getServer
public SocketAddress getServer()
- Returns:
- the DNS resolver address
-
setServer
public SrvResolverOptions setServer(SocketAddress server)
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
public SrvResolverOptions setMinTTL(int minTTL)
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
public TimeUnit getMinTTLUnit()
- Returns:
- the unit of
setMinTTL(int).
-
setMinTTLUnit
public SrvResolverOptions setMinTTLUnit(TimeUnit minTTLUnit)
Set the unit ofsetMinTTL(int), the default value isTimeUnit.SECONDS.- Parameters:
minTTLUnit- the unit- Returns:
- this options instance
-
-