本文整理了Java中io.vertx.core.VertxOptions.getInternalBlockingPoolSize()
方法的一些代码示例,展示了VertxOptions.getInternalBlockingPoolSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VertxOptions.getInternalBlockingPoolSize()
方法的具体详情如下:
包路径:io.vertx.core.VertxOptions
类名称:VertxOptions
方法名:getInternalBlockingPoolSize
[英]Get the value of internal blocking pool size.
Vert.x maintains a pool for internal blocking operations
[中]获取内部阻塞池大小的值。
维特。x为内部阻塞操作维护一个池
代码示例来源:origin: eclipse-vertx/vert.x
json.put("haGroup", obj.getHAGroup());
json.put("internalBlockingPoolSize", obj.getInternalBlockingPoolSize());
json.put("maxEventLoopExecuteTime", obj.getMaxEventLoopExecuteTime());
if (obj.getMaxEventLoopExecuteTimeUnit() != null) {
代码示例来源:origin: eclipse-vertx/vert.x
FakePoolMetrics metrics = (FakePoolMetrics) all.get("vert.x-internal-blocking");
assertThat(metrics.getPoolSize(), is(getOptions().getInternalBlockingPoolSize()));
assertThat(metrics.numberOfIdleThreads(), is(getOptions().getInternalBlockingPoolSize()));
代码示例来源:origin: eclipse-vertx/vert.x
assertThat(metrics.getPoolSize(), is(getOptions().getInternalBlockingPoolSize()));
assertThat(metrics.numberOfIdleThreads(), is(getOptions().getWorkerPoolSize()));
代码示例来源:origin: eclipse-vertx/vert.x
FakePoolMetrics metrics = (FakePoolMetrics) all.get("vert.x-worker-thread");
assertThat(metrics.getPoolSize(), is(getOptions().getInternalBlockingPoolSize()));
assertThat(metrics.numberOfIdleThreads(), is(getOptions().getWorkerPoolSize()));
代码示例来源:origin: eclipse-vertx/vert.x
new VertxThreadFactory("vert.x-worker-thread-", checker, true, options.getMaxWorkerExecuteTime(), options.getMaxWorkerExecuteTimeUnit()));
PoolMetrics workerPoolMetrics = metrics != null ? metrics.createPoolMetrics("worker", "vert.x-worker-thread", options.getWorkerPoolSize()) : null;
ExecutorService internalBlockingExec = Executors.newFixedThreadPool(options.getInternalBlockingPoolSize(),
new VertxThreadFactory("vert.x-internal-blocking-", checker, true, options.getMaxWorkerExecuteTime(), options.getMaxWorkerExecuteTimeUnit()));
PoolMetrics internalBlockingPoolMetrics = metrics != null ? metrics.createPoolMetrics("worker", "vert.x-internal-blocking", options.getInternalBlockingPoolSize()) : null;
internalBlockingPool = new WorkerPool(internalBlockingExec, internalBlockingPoolMetrics);
namedWorkerPools = new HashMap<>();
代码示例来源:origin: eclipse-vertx/vert.x
/**
* Copy constructor
*
* @param other The other {@code VertxOptions} to copy when creating this
*/
public VertxOptions(VertxOptions other) {
this.eventLoopPoolSize = other.getEventLoopPoolSize();
this.workerPoolSize = other.getWorkerPoolSize();
this.blockedThreadCheckInterval = other.getBlockedThreadCheckInterval();
this.maxEventLoopExecuteTime = other.getMaxEventLoopExecuteTime();
this.maxWorkerExecuteTime = other.getMaxWorkerExecuteTime();
this.internalBlockingPoolSize = other.getInternalBlockingPoolSize();
this.clusterManager = other.getClusterManager();
this.haEnabled = other.isHAEnabled();
this.quorumSize = other.getQuorumSize();
this.haGroup = other.getHAGroup();
this.metricsOptions = other.getMetricsOptions() != null ? new MetricsOptions(other.getMetricsOptions()) : null;
this.fileSystemOptions = other.getFileSystemOptions() != null ? new FileSystemOptions(other.getFileSystemOptions()) : null;
this.warningExceptionTime = other.warningExceptionTime;
this.eventBusOptions = new EventBusOptions(other.eventBusOptions);
this.addressResolverOptions = other.addressResolverOptions != null ? new AddressResolverOptions() : null;
this.maxEventLoopExecuteTimeUnit = other.maxEventLoopExecuteTimeUnit;
this.maxWorkerExecuteTimeUnit = other.maxWorkerExecuteTimeUnit;
this.warningExceptionTimeUnit = other.warningExceptionTimeUnit;
this.blockedThreadCheckIntervalUnit = other.blockedThreadCheckIntervalUnit;
}
代码示例来源:origin: eclipse-vertx/vert.x
assertEquals(20000, options.getClusterPingReplyInterval());
assertEquals(2 * Runtime.getRuntime().availableProcessors(), options.getEventLoopPoolSize());
assertEquals(20, options.getInternalBlockingPoolSize());
assertEquals(20, options.getWorkerPoolSize());
assertEquals(1000, options.getBlockedThreadCheckInterval());
assertEquals(clusterPingReplyInterval, options.getClusterPingReplyInterval());
assertEquals(eventLoopPoolSize, options.getEventLoopPoolSize());
assertEquals(internalBlockingPoolSize, options.getInternalBlockingPoolSize());
assertEquals(workerPoolSize, options.getWorkerPoolSize());
assertEquals(blockedThreadCheckInterval, options.getBlockedThreadCheckInterval());
代码示例来源: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(clusterPingReplyInterval, options.getClusterPingReplyInterval());
assertEquals(eventLoopPoolSize, options.getEventLoopPoolSize());
assertEquals(internalBlockingPoolSize, options.getInternalBlockingPoolSize());
assertEquals(workerPoolSize, options.getWorkerPoolSize());
assertEquals(blockedThreadCheckInterval, options.getBlockedThreadCheckInterval());
代码示例来源:origin: io.vertx/vertx-core
json.put("haGroup", obj.getHAGroup());
json.put("internalBlockingPoolSize", obj.getInternalBlockingPoolSize());
json.put("maxEventLoopExecuteTime", obj.getMaxEventLoopExecuteTime());
if (obj.getMaxEventLoopExecuteTimeUnit() != null) {
代码示例来源:origin: io.vertx/vertx-core
FakePoolMetrics metrics = (FakePoolMetrics) all.get("vert.x-internal-blocking");
assertThat(metrics.getPoolSize(), is(getOptions().getInternalBlockingPoolSize()));
assertThat(metrics.numberOfIdleThreads(), is(getOptions().getInternalBlockingPoolSize()));
代码示例来源:origin: io.vertx/vertx-core
assertThat(metrics.getPoolSize(), is(getOptions().getInternalBlockingPoolSize()));
assertThat(metrics.numberOfIdleThreads(), is(getOptions().getWorkerPoolSize()));
代码示例来源:origin: eclipse-vertx/vert.x
assertEquals(20, options.getInternalBlockingPoolSize());
rand = TestUtils.randomPositiveInt();
assertEquals(options, options.setInternalBlockingPoolSize(rand));
assertEquals(rand, options.getInternalBlockingPoolSize());
try {
options.setInternalBlockingPoolSize(0);
代码示例来源:origin: io.vertx/vertx-core
FakePoolMetrics metrics = (FakePoolMetrics) all.get("vert.x-worker-thread");
assertThat(metrics.getPoolSize(), is(getOptions().getInternalBlockingPoolSize()));
assertThat(metrics.numberOfIdleThreads(), is(getOptions().getWorkerPoolSize()));
代码示例来源:origin: io.vertx/vertx-core
new VertxThreadFactory("vert.x-worker-thread-", checker, true, options.getMaxWorkerExecuteTime(), options.getMaxWorkerExecuteTimeUnit()));
PoolMetrics workerPoolMetrics = metrics != null ? metrics.createPoolMetrics("worker", "vert.x-worker-thread", options.getWorkerPoolSize()) : null;
ExecutorService internalBlockingExec = Executors.newFixedThreadPool(options.getInternalBlockingPoolSize(),
new VertxThreadFactory("vert.x-internal-blocking-", checker, true, options.getMaxWorkerExecuteTime(), options.getMaxWorkerExecuteTimeUnit()));
PoolMetrics internalBlockingPoolMetrics = metrics != null ? metrics.createPoolMetrics("worker", "vert.x-internal-blocking", options.getInternalBlockingPoolSize()) : null;
internalBlockingPool = new WorkerPool(internalBlockingExec, internalBlockingPoolMetrics);
namedWorkerPools = new HashMap<>();
代码示例来源:origin: io.vertx/vertx-core
/**
* Copy constructor
*
* @param other The other {@code VertxOptions} to copy when creating this
*/
public VertxOptions(VertxOptions other) {
this.eventLoopPoolSize = other.getEventLoopPoolSize();
this.workerPoolSize = other.getWorkerPoolSize();
this.blockedThreadCheckInterval = other.getBlockedThreadCheckInterval();
this.maxEventLoopExecuteTime = other.getMaxEventLoopExecuteTime();
this.maxWorkerExecuteTime = other.getMaxWorkerExecuteTime();
this.internalBlockingPoolSize = other.getInternalBlockingPoolSize();
this.clusterManager = other.getClusterManager();
this.haEnabled = other.isHAEnabled();
this.quorumSize = other.getQuorumSize();
this.haGroup = other.getHAGroup();
this.metricsOptions = other.getMetricsOptions() != null ? new MetricsOptions(other.getMetricsOptions()) : null;
this.fileSystemOptions = other.getFileSystemOptions() != null ? new FileSystemOptions(other.getFileSystemOptions()) : null;
this.warningExceptionTime = other.warningExceptionTime;
this.eventBusOptions = new EventBusOptions(other.eventBusOptions);
this.addressResolverOptions = other.addressResolverOptions != null ? new AddressResolverOptions() : null;
this.maxEventLoopExecuteTimeUnit = other.maxEventLoopExecuteTimeUnit;
this.maxWorkerExecuteTimeUnit = other.maxWorkerExecuteTimeUnit;
this.warningExceptionTimeUnit = other.warningExceptionTimeUnit;
this.blockedThreadCheckIntervalUnit = other.blockedThreadCheckIntervalUnit;
}
代码示例来源:origin: io.vertx/vertx-core
assertEquals(20000, options.getClusterPingReplyInterval());
assertEquals(2 * Runtime.getRuntime().availableProcessors(), options.getEventLoopPoolSize());
assertEquals(20, options.getInternalBlockingPoolSize());
assertEquals(20, options.getWorkerPoolSize());
assertEquals(1000, options.getBlockedThreadCheckInterval());
assertEquals(clusterPingReplyInterval, options.getClusterPingReplyInterval());
assertEquals(eventLoopPoolSize, options.getEventLoopPoolSize());
assertEquals(internalBlockingPoolSize, options.getInternalBlockingPoolSize());
assertEquals(workerPoolSize, options.getWorkerPoolSize());
assertEquals(blockedThreadCheckInterval, options.getBlockedThreadCheckInterval());
代码示例来源: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(clusterPingReplyInterval, options.getClusterPingReplyInterval());
assertEquals(eventLoopPoolSize, options.getEventLoopPoolSize());
assertEquals(internalBlockingPoolSize, options.getInternalBlockingPoolSize());
assertEquals(workerPoolSize, options.getWorkerPoolSize());
assertEquals(blockedThreadCheckInterval, options.getBlockedThreadCheckInterval());
代码示例来源:origin: io.vertx/vertx-core
assertEquals(20, options.getInternalBlockingPoolSize());
rand = TestUtils.randomPositiveInt();
assertEquals(options, options.setInternalBlockingPoolSize(rand));
assertEquals(rand, options.getInternalBlockingPoolSize());
try {
options.setInternalBlockingPoolSize(0);
内容来源于网络,如有侵权,请联系作者删除!