本文整理匯總了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)));
}