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 SocketAddress
DEFAULT_SERVER
static int
MIN_TTL
static TimeUnit
MIN_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 int
getMinTTL()
TimeUnit
getMinTTLUnit()
SocketAddress
getServer()
SrvResolverOptions
setMinTTL(int minTTL)
Set the minimum amount of time inunit of time
the resolver caches DNS responses, the default value is0
SrvResolverOptions
setMinTTLUnit(TimeUnit minTTLUnit)
Set the unit ofsetMinTTL(int)
, the default value isTimeUnit.SECONDS
.SrvResolverOptions
setServer(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 time
the resolver caches DNS responses.
-
setMinTTL
public SrvResolverOptions setMinTTL(int minTTL)
Set the minimum amount of time in
unit of time
the resolver caches DNS responses, the default value is0
This 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
-
-