Java 类io.vertx.core.dns.AddressResolverOptions 实例源码

项目:app-ms    文件:VertxConfig.java   
/**
 * DNS Address resolver options where the max queries is increased to 10 to
 * support more environments.
 *
 * @return address resolver options
 */
@Bean
public AddressResolverOptions addressResolverOptions() {

    return new AddressResolverOptions()
        .setMaxQueries(10);
}
项目:app-ms    文件:VertxConfig.java   
@Bean
public VertxOptions vertxOptions(final AddressResolverOptions addressResolverOptions) {

    return new VertxOptions()
        .setAddressResolverOptions(addressResolverOptions)
        .setWarningExceptionTime(vertxWarningExceptionTime)
        .setWorkerPoolSize(vertxWorkerPoolSize);
}
项目:moviediary    文件:Launcher.java   
public static void main(String[] args) {
  setLoggingToSLF4J();
  deployVerticle(vertx(new VertxOptions().setAddressResolverOptions(new AddressResolverOptions()
      .addServer("8.8.8.8")
      .addServer("8.8.4.4"))), new ServerVerticle(), new DeploymentOptions()
      .setConfig(getConfig(args)))
      .subscribe(ar -> log.info("Server up!"), thr -> log.error("Failed to start server", thr));
}
项目:hono    文件:AppConfiguration.java   
/**
 * Exposes a Vert.x instance as a Spring bean.
 * 
 * @return The Vert.x instance.
 */
@Bean
public Vertx vertx() {
    VertxOptions options = new VertxOptions()
            .setWarningExceptionTime(1500000000)
            .setAddressResolverOptions(new AddressResolverOptions()
                    .setCacheNegativeTimeToLive(0) // discard failed DNS lookup results immediately
                    .setCacheMaxTimeToLive(0) // support DNS based service resolution
                    .setRotateServers(true)
                    .setQueryTimeout(DEFAULT_ADDRESS_RESOLUTION_TIMEOUT));
    return Vertx.vertx(options);
}
项目:hono    文件:ApplicationConfig.java   
/**
 * Gets the singleton Vert.x instance to be used by Hono.
 * 
 * @return the instance.
 */
@Bean
public Vertx vertx() {
    VertxOptions options = new VertxOptions()
            .setWarningExceptionTime(1500000000)
            .setAddressResolverOptions(new AddressResolverOptions()
                    .setCacheNegativeTimeToLive(0) // discard failed DNS lookup results immediately
                    .setCacheMaxTimeToLive(0) // support DNS based service resolution
                    .setQueryTimeout(1000));
    return Vertx.vertx(options);
}
项目:hono    文件:ApplicationConfig.java   
/**
 * Gets the singleton Vert.x instance to be used by Hono.
 * 
 * @return the instance.
 */
@Bean
public Vertx vertx() {
    VertxOptions options = new VertxOptions()
            .setWarningExceptionTime(1500000000)
            .setAddressResolverOptions(new AddressResolverOptions()
                    .setCacheNegativeTimeToLive(0) // discard failed DNS lookup results immediately
                    .setCacheMaxTimeToLive(0) // support DNS based service resolution
                    .setQueryTimeout(1000));
    return Vertx.vertx(options);
}
项目:hono    文件:HonoMessagingApplicationConfig.java   
/**
 * Gets the singleton Vert.x instance to be used by Hono.
 *
 * @return the instance.
 */
@Bean
public Vertx vertx() {
    VertxOptions options = new VertxOptions()
            .setWarningExceptionTime(1500000000)
            .setAddressResolverOptions(new AddressResolverOptions()
                    .setCacheNegativeTimeToLive(0) // discard failed DNS lookup results immediately
                    .setCacheMaxTimeToLive(0) // support DNS based service resolution
                    .setQueryTimeout(1000));
    if (metricsOptions != null) {
        options.setMetricsOptions(metricsOptions);
    }
    return Vertx.vertx(options);
}
项目:hono    文件:AbstractClient.java   
Vertx vertx() {
    VertxOptions options = new VertxOptions()
            .setWarningExceptionTime(1500000000)
            .setAddressResolverOptions(new AddressResolverOptions()
                    .setCacheNegativeTimeToLive(0) // discard failed DNS lookup results immediately
                    .setCacheMaxTimeToLive(0) // support DNS based service resolution
                    .setRotateServers(true)
                    .setQueryTimeout(DEFAULT_ADDRESS_RESOLUTION_TIMEOUT_MILLIS));
    return Vertx.vertx(options);
}
项目:hono    文件:AbstractAdapterConfig.java   
/**
 * Exposes a Vert.x instance as a Spring bean.
 *
 * @return The Vert.x instance.
 */
@Bean
public Vertx vertx() {
    VertxOptions options = new VertxOptions()
            .setWarningExceptionTime(1500000000)
            .setAddressResolverOptions(new AddressResolverOptions()
                    .setCacheNegativeTimeToLive(0) // discard failed DNS lookup results immediately
                    .setCacheMaxTimeToLive(0) // support DNS based service resolution
                    .setQueryTimeout(1000));
    if (metricsOptions != null) {
        options.setMetricsOptions(metricsOptions);
    }
    return Vertx.vertx(options);
}
项目:vertx-web    文件:WebClientTest.java   
@Override
protected VertxOptions getOptions() {
  return super.getOptions().setAddressResolverOptions(new AddressResolverOptions().
    setHostsValue(Buffer.buffer(
      "127.0.0.1 somehost\n" +
      "127.0.0.1 localhost")));
}
项目:vertx-web    文件:InterceptorTest.java   
@Override
protected VertxOptions getOptions() {
  return super.getOptions().setAddressResolverOptions(new AddressResolverOptions().
    setHostsValue(Buffer.buffer(
      "127.0.0.1 somehost\n" +
      "127.0.0.1 localhost")));
}
项目:vertx-spring    文件:VertxProperties.java   
private Cache(AddressResolverOptions options) {
    this.options = options;
}