case "blockedThreadCheckInterval": if (member.getValue() instanceof Number) { obj.setBlockedThreadCheckInterval(((Number)member.getValue()).longValue());
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); }
options.setInternalBlockingPoolSize(internalBlockingPoolSize); options.setWorkerPoolSize(workerPoolSize); options.setBlockedThreadCheckInterval(blockedThreadCheckInterval); options.setClusterHost(clusterHost); options.setClusterPublicHost(clusterPublicHost);
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); }
case "blockedThreadCheckInterval": if (member.getValue() instanceof Number) { obj.setBlockedThreadCheckInterval(((Number)member.getValue()).longValue());
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); }
assertEquals(options, options.setBlockedThreadCheckInterval(rand)); assertEquals(rand, options.getBlockedThreadCheckInterval()); try { options.setBlockedThreadCheckInterval(0); fail("Should throw exception"); } catch (IllegalArgumentException e) {
/** * 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; }
options.setInternalBlockingPoolSize(internalBlockingPoolSize); options.setWorkerPoolSize(workerPoolSize); options.setBlockedThreadCheckInterval(blockedThreadCheckInterval); options.setClusterHost(clusterHost); options.setClusterPublicHost(clusterPublicHost);
/** * 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; }
assertEquals(options, options.setBlockedThreadCheckInterval(rand)); assertEquals(rand, options.getBlockedThreadCheckInterval()); try { options.setBlockedThreadCheckInterval(0); fail("Should throw exception"); } catch (IllegalArgumentException e) {
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(); } }); }
@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); }