本文整理汇总了Java中io.vertx.core.VertxOptions.setWarningExceptionTime方法的典型用法代码示例。如果您正苦于以下问题:Java VertxOptions.setWarningExceptionTime方法的具体用法?Java VertxOptions.setWarningExceptionTime怎么用?Java VertxOptions.setWarningExceptionTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.vertx.core.VertxOptions
的用法示例。
在下文中一共展示了VertxOptions.setWarningExceptionTime方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import io.vertx.core.VertxOptions; //导入方法依赖的package包/类
public Single<Void> start(JsonObject defaultConfig, Class<?>... resourceOrProviderClasses){
setupLogging();
VertxOptions options = new VertxOptions();
options.setWarningExceptionTime(Long.MAX_VALUE);
vertx = Vertx.vertx(options);
AppGlobals.init();
AppGlobals.get().setVertx(vertx);
// Propagate the Resteasy context on RxJava
RxJavaHooks.setOnSingleCreate(new ResteasyContextPropagatingOnSingleCreateAction());
return loadConfig(defaultConfig)
.flatMap(config -> {
return setupPlugins()
.flatMap(v -> setupTemplateRenderers())
.flatMap(v -> setupResteasy(resourceOrProviderClasses))
.flatMap(deployment -> {
setupSwagger(deployment);
return setupVertx(config, deployment);
});
});
}
示例2: setUp
import io.vertx.core.VertxOptions; //导入方法依赖的package包/类
@Before
public void setUp(TestContext context) {
Async async = context.async();
VertxOptions options = new VertxOptions();
options.setBlockedThreadCheckInterval(60000); // in ms
options.setWarningExceptionTime(60000); // in ms
vertx = Vertx.vertx(options);
RestAssured.port = port;
client = vertx.createHttpClient();
checkDocker(res2 -> {
haveDocker = res2.succeeded();
logger.info("haveDocker = " + haveDocker);
DeploymentOptions opt = new DeploymentOptions()
.setConfig(new JsonObject().put("port", Integer.toString(port)));
vertx.deployVerticle(MainVerticle.class.getName(),
opt, res -> async.complete());
});
}
示例3: main
import io.vertx.core.VertxOptions; //导入方法依赖的package包/类
public static void main(final String[] args) throws Exception {
final VertxOptions vertOptions = new VertxOptions();
vertOptions.setWarningExceptionTime(1);
vertOptions.setWorkerPoolSize(50);
final Vertx vertx = Vertx.vertx(vertOptions);
final DeploymentOptions options = new DeploymentOptions();
vertx.deployVerticle(new EngineSampleMain(), options);
}
示例4: beforeStartingVertx
import io.vertx.core.VertxOptions; //导入方法依赖的package包/类
@Override
public void beforeStartingVertx(VertxOptions options) {
super.beforeStartingVertx(options);
System.setProperty(LOGGER_DELEGATE_FACTORY_CLASS_NAME, SLF4JLogDelegateFactory.class.getName());
options.setWarningExceptionTime(
config.getLong(VERTX_OPTIONS_PROP_PREFIX + "warningExceptionTime", options.getWarningExceptionTime())
);
}
示例5: beforeStartingVertx
import io.vertx.core.VertxOptions; //导入方法依赖的package包/类
@Override
public void beforeStartingVertx(VertxOptions options) {
// TODO Auto-generated method stub
super.beforeStartingVertx(options);
System.out.println("starting rest verticle service..........");
options.setBlockedThreadCheckInterval(1500000);
options.setWarningExceptionTime(1500000);
options.setMetricsOptions(new DropwizardMetricsOptions().setEnabled(true).addMonitoredHttpServerUri(
new Match().setValue("/.*").setType(MatchType.REGEX)));
}