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

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

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

VertxOptions.setBlockedThreadCheckInterval介绍

[英]Sets the value of blocked thread check period, in VertxOptions#setBlockedThreadCheckIntervalUnit.

The default value of VertxOptions#setBlockedThreadCheckIntervalUnit is TimeUnit#MILLISECONDS
[中]以VertxOptions#setBlockedThreadCheckIntervalUnit为单位设置阻塞线程检查周期的值。
VertxOptions#SetBlockedThreadCheckInterValuenit的默认值为时间单位#毫秒

代码示例

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

case "blockedThreadCheckInterval":
 if (member.getValue() instanceof Number) {
  obj.setBlockedThreadCheckInterval(((Number)member.getValue()).longValue());

代码示例来源:origin: apache/servicecomb-java-chassis

public static Vertx init(String name, VertxOptions vertxOptions) {
 if (vertxOptions == null) {
  vertxOptions = new VertxOptions();
 }
 boolean isDebug = ManagementFactory.getRuntimeMXBean().getInputArguments().toString().contains("jdwp");
 if (isDebug) {
  vertxOptions.setBlockedThreadCheckInterval(BLOCKED_THREAD_CHECK_INTERVAL);
  LOGGER.info("in debug mode, disable blocked thread check.");
 }
 configureVertxFileCaching();
 return new VertxImplEx(name, vertxOptions);
}

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

options.setInternalBlockingPoolSize(internalBlockingPoolSize);
options.setWorkerPoolSize(workerPoolSize);
options.setBlockedThreadCheckInterval(blockedThreadCheckInterval);
options.setClusterHost(clusterHost);
options.setClusterPublicHost(clusterPublicHost);

代码示例来源:origin: org.apache.servicecomb/foundation-vertx

public static Vertx init(String name, VertxOptions vertxOptions) {
 if (vertxOptions == null) {
  vertxOptions = new VertxOptions();
 }
 boolean isDebug = ManagementFactory.getRuntimeMXBean().getInputArguments().toString().contains("jdwp");
 if (isDebug) {
  vertxOptions.setBlockedThreadCheckInterval(BLOCKED_THREAD_CHECK_INTERVAL);
  LOGGER.info("in debug mode, disable blocked thread check.");
 }
 configureVertxFileCaching();
 return new VertxImplEx(name, vertxOptions);
}

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

case "blockedThreadCheckInterval":
 if (member.getValue() instanceof Number) {
  obj.setBlockedThreadCheckInterval(((Number)member.getValue()).longValue());

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

public static Vertx init(String name, VertxOptions vertxOptions) {
 if (vertxOptions == null) {
  vertxOptions = new VertxOptions();
 }
 boolean isDebug = ManagementFactory.getRuntimeMXBean().getInputArguments().toString().indexOf("jdwp") >= 0;
 if (isDebug) {
  vertxOptions.setBlockedThreadCheckInterval(BLOCKED_THREAD_CHECK_INTERVAL);
  LOGGER.info("in debug mode, disable blocked thread check.");
 }
 configureVertxFileCaching();
 return new VertxImplEx(name, vertxOptions);
}

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

assertEquals(options, options.setBlockedThreadCheckInterval(rand));
assertEquals(rand, options.getBlockedThreadCheckInterval());
try {
 options.setBlockedThreadCheckInterval(0);
 fail("Should throw exception");
} catch (IllegalArgumentException e) {

代码示例来源:origin: de.braintags/vertx-pojo-mapper-common-test

/**
 * Creates the VertxOptions by checking System variables BlockedThreadCheckInterval and WarningExceptionTime
 * 
 * @deprecated Use {@link BtVertxTestBase#getOptions()}
 */
@Deprecated
public static VertxOptions getOptions() {
 VertxOptions options = new VertxOptions();
 String blockedThreadCheckInterval = System.getProperty("BlockedThreadCheckInterval");
 if (blockedThreadCheckInterval != null) {
  logger.info("setting setBlockedThreadCheckInterval to " + blockedThreadCheckInterval);
  options.setBlockedThreadCheckInterval(Long.parseLong(blockedThreadCheckInterval));
 }
 String warningExceptionTime = System.getProperty("WarningExceptionTime");
 if (warningExceptionTime != null) {
  logger.info("setting setWarningExceptionTime to " + warningExceptionTime);
  options.setWarningExceptionTime(Long.parseLong(warningExceptionTime));
 }
 return options;
}

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

options.setInternalBlockingPoolSize(internalBlockingPoolSize);
options.setWorkerPoolSize(workerPoolSize);
options.setBlockedThreadCheckInterval(blockedThreadCheckInterval);
options.setClusterHost(clusterHost);
options.setClusterPublicHost(clusterPublicHost);

代码示例来源:origin: de.braintags/vertx-util

/**
 * Creates the VertxOptions by checking System variables BlockedThreadCheckInterval and WarningExceptionTime
 */
public static VertxOptions getVertxOptions() {
 VertxOptions options = new VertxOptions();
 String blockedThreadCheckInterval = System.getProperty("BlockedThreadCheckInterval");
 if (blockedThreadCheckInterval != null) {
  LOGGER.info("setting setBlockedThreadCheckInterval to " + blockedThreadCheckInterval);
  options.setBlockedThreadCheckInterval(Long.parseLong(blockedThreadCheckInterval));
 }
 String warningExceptionTime = System.getProperty("WarningExceptionTime");
 if (warningExceptionTime != null) {
  LOGGER.info("setting setWarningExceptionTime to " + warningExceptionTime);
  options.setWarningExceptionTime(Long.parseLong(warningExceptionTime));
 }
 return options;
}

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

assertEquals(options, options.setBlockedThreadCheckInterval(rand));
assertEquals(rand, options.getBlockedThreadCheckInterval());
try {
 options.setBlockedThreadCheckInterval(0);
 fail("Should throw exception");
} catch (IllegalArgumentException e) {

代码示例来源:origin: codingchili/excelastic

private ApplicationLauncher(String[] args) {
  VertxOptions options = new VertxOptions();
  options.setMaxWorkerExecuteTime(options.getMaxWorkerExecuteTime() * 20) // 20 minutes.
      .setMaxEventLoopExecuteTime(options.getMaxEventLoopExecuteTime() * 10) // 10 seconds.
      .setBlockedThreadCheckInterval(8000);
  vertx = Vertx.vertx();
  ImportEventCodec.registerOn(vertx);
  logger.startupMessage();
  start().setHandler(done -> {
    if (done.succeeded()) {
      logger.applicationStartup();
      if (args.length > 1) {
        // import file from the command line.
        new CommandLine(vertx, args);
      } else {
        // wait for the elasticsearch server to come online to show the import UI.
        waitForElasticServerAvailability();
      }
    } else {
      logger.applicationStartupFailure(done.cause());
      vertx.close();
    }
  });
}

代码示例来源: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);
}

相关文章

VertxOptions类方法