io.vertx.core.VertxOptions.setEventLoopPoolSize()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(268)

本文整理了Java中io.vertx.core.VertxOptions.setEventLoopPoolSize()方法的一些代码示例,展示了VertxOptions.setEventLoopPoolSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VertxOptions.setEventLoopPoolSize()方法的具体详情如下:
包路径:io.vertx.core.VertxOptions
类名称:VertxOptions
方法名:setEventLoopPoolSize

VertxOptions.setEventLoopPoolSize介绍

[英]Set the number of event loop threads to be used by the Vert.x instance.
[中]设置Vert要使用的事件循环线程数。例如。

代码示例

代码示例来源:origin: eclipse-vertx/vert.x

case "eventLoopPoolSize":
 if (member.getValue() instanceof Number) {
  obj.setEventLoopPoolSize(((Number)member.getValue()).intValue());

代码示例来源:origin: io.vertx/vertx-core

case "eventLoopPoolSize":
 if (member.getValue() instanceof Number) {
  obj.setEventLoopPoolSize(((Number)member.getValue()).intValue());

代码示例来源:origin: eclipse-vertx/vert.x

options.setClusterPort(clusterPort);
options.setClusterPublicPort(clusterPublicPort);
options.setEventLoopPoolSize(eventLoopPoolSize);
options.setInternalBlockingPoolSize(internalBlockingPoolSize);
options.setWorkerPoolSize(workerPoolSize);

代码示例来源:origin: eclipse-vertx/vert.x

assertEquals(2 * Runtime.getRuntime().availableProcessors(), options.getEventLoopPoolSize());
int rand = TestUtils.randomPositiveInt();
assertEquals(options, options.setEventLoopPoolSize(rand));
assertEquals(rand, options.getEventLoopPoolSize());
try {
 options.setEventLoopPoolSize(0);
 fail("Should throw exception");
} catch (IllegalArgumentException e) {

代码示例来源:origin: vietj/advanced-vertx-guide

public static void eventLoop() {
 Vertx vertx = Vertx.vertx(new VertxOptions().setEventLoopPoolSize(10));
}

代码示例来源:origin: EnMasseProject/enmasse

public static Vertx create() {
    VertxOptions options = new VertxOptions()
        .setWorkerPoolSize(1)
        .setInternalBlockingPoolSize(1)
        .setEventLoopPoolSize(1);
    return Vertx.vertx(options);
  }
}

代码示例来源:origin: wanghongfei/gae

options.setEventLoopPoolSize(nioThreads);
options.setMaxWorkerExecuteTime(1000);

代码示例来源:origin: io.vertx/vertx-auth-jwt

@Override
protected VertxOptions getOptions() {
  return new VertxOptions().setEventLoopPoolSize(16);
}

代码示例来源:origin: io.vertx/vertx-core

options.setClusterPort(clusterPort);
options.setClusterPublicPort(clusterPublicPort);
options.setEventLoopPoolSize(eventLoopPoolSize);
options.setInternalBlockingPoolSize(internalBlockingPoolSize);
options.setWorkerPoolSize(workerPoolSize);

代码示例来源:origin: org.amv.vertx/amv-vertx-spring-boot-starter

@ConditionalOnMissingBean(VertxOptions.class)
@Bean
public VertxOptions vertxOptions(EventBusOptions eventBusOptions, MetricsOptions metricsOptions) {
  return new VertxOptions()
      .setBlockedThreadCheckInterval(properties.getBlockedThreadCheckInterval())
      .setEventLoopPoolSize(properties.getEventLoopPoolSize())
      .setWorkerPoolSize(properties.getWorkerPoolSize())
      .setInternalBlockingPoolSize(properties.getInternalBlockingPoolSize())
      .setQuorumSize(properties.getQuorumSize())
      .setMaxEventLoopExecuteTime(properties.getMaxEventLoopExecuteTime())
      .setHAGroup(properties.getHaGroup())
      .setMaxWorkerExecuteTime(properties.getMaxWorkerExecuteTime())
      .setWarningExceptionTime(properties.getWarningExceptionTime())
      .setFileResolverCachingEnabled(properties.isFileResolverCachingEnabled())
      .setHAEnabled(properties.isHaEnabled())
      .setEventBusOptions(eventBusOptions)
      .setMetricsOptions(metricsOptions);
}

代码示例来源:origin: io.vertx/vertx-core

assertEquals(2 * Runtime.getRuntime().availableProcessors(), options.getEventLoopPoolSize());
int rand = TestUtils.randomPositiveInt();
assertEquals(options, options.setEventLoopPoolSize(rand));
assertEquals(rand, options.getEventLoopPoolSize());
try {
 options.setEventLoopPoolSize(0);
 fail("Should throw exception");
} catch (IllegalArgumentException e) {

相关文章

VertxOptions类方法