Class SrvResolverOptions

java.lang.Object
io.vertx.serviceresolver.ServiceResolverOptions
io.vertx.serviceresolver.srv.SrvResolverOptions

public class SrvResolverOptions extends ServiceResolverOptions
  • Field Details

  • Constructor Details

    • SrvResolverOptions

      public SrvResolverOptions()
    • SrvResolverOptions

      public SrvResolverOptions(SrvResolverOptions other)
    • SrvResolverOptions

      public SrvResolverOptions(JsonObject json)
  • Method Details

    • 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 is 0

      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 of setMinTTL(int), the default value is TimeUnit.SECONDS.
      Parameters:
      minTTLUnit - the unit
      Returns:
      this options instance