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

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

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

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());

相关文章

VertxOptions类方法