io.vertx.core.spi.resolver.ResolverProvider Java Examples
The following examples show how to use
io.vertx.core.spi.resolver.ResolverProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VertxCoreProcessor.java From quarkus with Apache License 2.0 | 5 votes |
@BuildStep NativeImageConfigBuildItem build(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) { reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, VertxLogDelegateFactory.class.getName())); return NativeImageConfigBuildItem.builder() .addRuntimeInitializedClass("io.vertx.core.net.impl.PartialPooledByteBufAllocator") .addRuntimeInitializedClass("io.vertx.core.http.impl.VertxHttp2ClientUpgradeCodec") .addRuntimeInitializedClass("io.vertx.core.eventbus.impl.clustered.ClusteredEventBus") .addNativeImageSystemProperty(ResolverProvider.DISABLE_DNS_RESOLVER_PROP_NAME, "true") .addNativeImageSystemProperty("vertx.logger-delegate-factory-class-name", VertxLogDelegateFactory.class.getName()) .build(); }
Example #2
Source File: VertxTestBase.java From Lealone-Plugins with Apache License 2.0 | 5 votes |
public static void optimizeVertx() { // 如果不禁用的话 // 执行到javax.naming.spi.NamingManager.getInitialContext方法的return factory.getInitialContext()会 // 生成一个类似"Thread-XXX"这样的线程 System.setProperty(ResolverProvider.DISABLE_DNS_RESOLVER_PROP_NAME, "true"); disableSSLContext(); }
Example #3
Source File: VertxNetServerStart.java From Lealone-Plugins with Apache License 2.0 | 5 votes |
public static void optimizeVertx() { // 如果不禁用的话 // 执行到javax.naming.spi.NamingManager.getInitialContext方法的return factory.getInitialContext()会 // 生成一个类似"Thread-XXX"这样的线程 System.setProperty(ResolverProvider.DISABLE_DNS_RESOLVER_PROP_NAME, "true"); // disableSSLContext(); }
Example #4
Source File: SVMSubstitutions.java From aws-lambda-native-vertx with MIT License | 4 votes |
@Substitute public static ResolverProvider factory(Vertx vertx, AddressResolverOptions options) { return new DefaultResolverProvider(); }
Example #5
Source File: VertxCoreRecorder.java From quarkus with Apache License 2.0 | 4 votes |
private static VertxOptions convertToVertxOptions(VertxConfiguration conf, VertxOptions options, boolean allowClustering) { if (!conf.useAsyncDNS) { System.setProperty(ResolverProvider.DISABLE_DNS_RESOLVER_PROP_NAME, "true"); } if (allowClustering) { // Order matters, as the cluster options modifies the event bus options. setEventBusOptions(conf, options); initializeClusterOptions(conf, options); } String fileCacheDir = System.getProperty(CACHE_DIR_BASE_PROP_NAME, System.getProperty("java.io.tmpdir", ".") + File.separator + "vertx-cache"); options.setFileSystemOptions(new FileSystemOptions() .setFileCachingEnabled(conf.caching) .setFileCacheDir(fileCacheDir) .setClassPathResolvingEnabled(conf.classpathResolving)); options.setWorkerPoolSize(conf.workerPoolSize); options.setInternalBlockingPoolSize(conf.internalBlockingPoolSize); options.setBlockedThreadCheckInterval(conf.warningExceptionTime.toMillis()); if (conf.eventLoopsPoolSize.isPresent()) { options.setEventLoopPoolSize(conf.eventLoopsPoolSize.getAsInt()); } else { options.setEventLoopPoolSize(calculateDefaultIOThreads()); } Optional<Duration> maxEventLoopExecuteTime = conf.maxEventLoopExecuteTime; if (maxEventLoopExecuteTime.isPresent()) { options.setMaxEventLoopExecuteTime(maxEventLoopExecuteTime.get().toMillis()); options.setMaxEventLoopExecuteTimeUnit(TimeUnit.MILLISECONDS); } Optional<Duration> maxWorkerExecuteTime = conf.maxWorkerExecuteTime; if (maxWorkerExecuteTime.isPresent()) { options.setMaxWorkerExecuteTime(maxWorkerExecuteTime.get().toMillis()); options.setMaxWorkerExecuteTimeUnit(TimeUnit.MILLISECONDS); } options.setWarningExceptionTime(conf.warningExceptionTime.toNanos()); options.setPreferNativeTransport(conf.preferNativeTransport); return options; }
Example #6
Source File: VertxSubstitutions.java From quarkus with Apache License 2.0 | 4 votes |
@Substitute public static ResolverProvider factory(Vertx vertx, AddressResolverOptions options) { return new DefaultResolverProvider(); }