本文整理了Java中io.vertx.core.VertxOptions.getClusterPingReplyInterval()
方法的一些代码示例,展示了VertxOptions.getClusterPingReplyInterval()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VertxOptions.getClusterPingReplyInterval()
方法的具体详情如下:
包路径:io.vertx.core.VertxOptions
类名称:VertxOptions
方法名:getClusterPingReplyInterval
[英]Get the value of cluster ping reply interval, in ms.
After sending a ping, if a pong is not received in this time, the node will be considered dead.
[中]获取集群ping回复间隔的值,单位为ms。
在发送ping之后,如果此时未接收到pong,则该节点将被视为已死亡。
代码示例来源:origin: eclipse-vertx/vert.x
json.put("clusterPingReplyInterval", obj.getClusterPingReplyInterval());
json.put("clusterPort", obj.getClusterPort());
if (obj.getClusterPublicHost() != null) {
代码示例来源:origin: eclipse-vertx/vert.x
assertEquals(-1, options.getClusterPublicPort());
assertEquals(20000, options.getClusterPingInterval());
assertEquals(20000, options.getClusterPingReplyInterval());
assertEquals(2 * Runtime.getRuntime().availableProcessors(), options.getEventLoopPoolSize());
assertEquals(20, options.getInternalBlockingPoolSize());
assertEquals(clusterPublicHost, options.getClusterPublicHost());
assertEquals(clusterPingInterval, options.getClusterPingInterval());
assertEquals(clusterPingReplyInterval, options.getClusterPingReplyInterval());
assertEquals(eventLoopPoolSize, options.getEventLoopPoolSize());
assertEquals(internalBlockingPoolSize, options.getInternalBlockingPoolSize());
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testDefaultJsonOptions() {
VertxOptions def = new VertxOptions();
VertxOptions json = new VertxOptions(new JsonObject());
assertEquals(def.getEventLoopPoolSize(), json.getEventLoopPoolSize());
assertEquals(def.getWorkerPoolSize(), json.getWorkerPoolSize());
assertEquals(def.isClustered(), json.isClustered());
assertEquals(def.getClusterHost(), json.getClusterHost());
assertEquals(def.getClusterPublicHost(), json.getClusterPublicHost());
assertEquals(def.getClusterPublicPort(), json.getClusterPublicPort());
assertEquals(def.getClusterPingInterval(), json.getClusterPingInterval());
assertEquals(def.getClusterPingReplyInterval(), json.getClusterPingReplyInterval());
assertEquals(def.getBlockedThreadCheckInterval(), json.getBlockedThreadCheckInterval());
assertEquals(def.getMaxEventLoopExecuteTime(), json.getMaxEventLoopExecuteTime());
assertEquals(def.getMaxWorkerExecuteTime(), json.getMaxWorkerExecuteTime());
assertEquals(def.getInternalBlockingPoolSize(), json.getInternalBlockingPoolSize());
assertEquals(def.isHAEnabled(), json.isHAEnabled());
assertEquals(def.getQuorumSize(), json.getQuorumSize());
assertEquals(def.getHAGroup(), json.getHAGroup());
assertEquals(def.getWarningExceptionTime(), json.getWarningExceptionTime());
assertEquals(def.isFileResolverCachingEnabled(), json.isFileResolverCachingEnabled());
assertEquals(def.getMaxEventLoopExecuteTimeUnit(), json.getMaxEventLoopExecuteTimeUnit());
assertEquals(def.getMaxWorkerExecuteTimeUnit(), json.getMaxWorkerExecuteTimeUnit());
assertEquals(def.getWarningExceptionTimeUnit(), json.getWarningExceptionTimeUnit());
assertEquals(def.getBlockedThreadCheckIntervalUnit(), json.getBlockedThreadCheckIntervalUnit());
}
代码示例来源:origin: eclipse-vertx/vert.x
assertEquals(clusterPublicPort, options.getClusterPublicPort());
assertEquals(clusterPingInterval, options.getClusterPingInterval());
assertEquals(clusterPingReplyInterval, options.getClusterPingReplyInterval());
assertEquals(eventLoopPoolSize, options.getEventLoopPoolSize());
assertEquals(internalBlockingPoolSize, options.getInternalBlockingPoolSize());
代码示例来源:origin: io.vertx/vertx-core
json.put("clusterPingReplyInterval", obj.getClusterPingReplyInterval());
json.put("clusterPort", obj.getClusterPort());
if (obj.getClusterPublicHost() != null) {
代码示例来源:origin: eclipse-vertx/vert.x
assertEquals(randomLong, options.getClusterPingInterval());
assertEquals(20000, options.getClusterPingReplyInterval());
randomLong = TestUtils.randomPositiveLong();
assertEquals(options, options.setClusterPingReplyInterval(randomLong));
assertEquals(randomLong, options.getClusterPingReplyInterval());
try {
options.setClusterPingReplyInterval(-1);
fail("Should throw exception");
} catch (IllegalArgumentException e) {
assertEquals(randomLong, options.getClusterPingReplyInterval());
代码示例来源:origin: io.vertx/vertx-core
assertEquals(-1, options.getClusterPublicPort());
assertEquals(20000, options.getClusterPingInterval());
assertEquals(20000, options.getClusterPingReplyInterval());
assertEquals(2 * Runtime.getRuntime().availableProcessors(), options.getEventLoopPoolSize());
assertEquals(20, options.getInternalBlockingPoolSize());
assertEquals(clusterPublicHost, options.getClusterPublicHost());
assertEquals(clusterPingInterval, options.getClusterPingInterval());
assertEquals(clusterPingReplyInterval, options.getClusterPingReplyInterval());
assertEquals(eventLoopPoolSize, options.getEventLoopPoolSize());
assertEquals(internalBlockingPoolSize, options.getInternalBlockingPoolSize());
代码示例来源:origin: io.vertx/vertx-core
@Test
public void testDefaultJsonOptions() {
VertxOptions def = new VertxOptions();
VertxOptions json = new VertxOptions(new JsonObject());
assertEquals(def.getEventLoopPoolSize(), json.getEventLoopPoolSize());
assertEquals(def.getWorkerPoolSize(), json.getWorkerPoolSize());
assertEquals(def.isClustered(), json.isClustered());
assertEquals(def.getClusterHost(), json.getClusterHost());
assertEquals(def.getClusterPublicHost(), json.getClusterPublicHost());
assertEquals(def.getClusterPublicPort(), json.getClusterPublicPort());
assertEquals(def.getClusterPingInterval(), json.getClusterPingInterval());
assertEquals(def.getClusterPingReplyInterval(), json.getClusterPingReplyInterval());
assertEquals(def.getBlockedThreadCheckInterval(), json.getBlockedThreadCheckInterval());
assertEquals(def.getMaxEventLoopExecuteTime(), json.getMaxEventLoopExecuteTime());
assertEquals(def.getMaxWorkerExecuteTime(), json.getMaxWorkerExecuteTime());
assertEquals(def.getInternalBlockingPoolSize(), json.getInternalBlockingPoolSize());
assertEquals(def.isHAEnabled(), json.isHAEnabled());
assertEquals(def.getQuorumSize(), json.getQuorumSize());
assertEquals(def.getHAGroup(), json.getHAGroup());
assertEquals(def.getWarningExceptionTime(), json.getWarningExceptionTime());
assertEquals(def.isFileResolverCachingEnabled(), json.isFileResolverCachingEnabled());
assertEquals(def.getMaxEventLoopExecuteTimeUnit(), json.getMaxEventLoopExecuteTimeUnit());
assertEquals(def.getMaxWorkerExecuteTimeUnit(), json.getMaxWorkerExecuteTimeUnit());
assertEquals(def.getWarningExceptionTimeUnit(), json.getWarningExceptionTimeUnit());
assertEquals(def.getBlockedThreadCheckIntervalUnit(), json.getBlockedThreadCheckIntervalUnit());
}
代码示例来源:origin: io.vertx/vertx-core
assertEquals(clusterPublicPort, options.getClusterPublicPort());
assertEquals(clusterPingInterval, options.getClusterPingInterval());
assertEquals(clusterPingReplyInterval, options.getClusterPingReplyInterval());
assertEquals(eventLoopPoolSize, options.getEventLoopPoolSize());
assertEquals(internalBlockingPoolSize, options.getInternalBlockingPoolSize());
代码示例来源:origin: io.vertx/vertx-core
assertEquals(randomLong, options.getClusterPingInterval());
assertEquals(20000, options.getClusterPingReplyInterval());
randomLong = TestUtils.randomPositiveLong();
assertEquals(options, options.setClusterPingReplyInterval(randomLong));
assertEquals(randomLong, options.getClusterPingReplyInterval());
try {
options.setClusterPingReplyInterval(-1);
fail("Should throw exception");
} catch (IllegalArgumentException e) {
assertEquals(randomLong, options.getClusterPingReplyInterval());
内容来源于网络,如有侵权,请联系作者删除!