@Test public void testSetMaxWorkerThreadPoolSize() { final Configuration c = new Configuration(); assertThatThrownBy(() -> c.setMaxWorkerThreadPoolSize(-1)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("maxWorkerThreadPoolSize: -1 (expected: > 0)"); assertThatThrownBy(() -> c.setMaxWorkerThreadPoolSize(0)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("maxWorkerThreadPoolSize: 0 (expected: > 0)"); }
public void setMaxWorkerThreadPoolSize(int maxWorkerThreadPoolSize) { if (maxWorkerThreadPoolSize <= 0) { throw new IllegalArgumentException("maxWorkerThreadPoolSize: " + maxWorkerThreadPoolSize + " (expected: > 0)"); } this.maxWorkerThreadPoolSize = maxWorkerThreadPoolSize; }
Configuration { public void setMaxWorkerThreadPoolSize(int maxWorkerThreadPoolSize) { if (maxWorkerThreadPoolSize <= 0) { throw new IllegalArgumentException("maxWorkerThreadPoolSize: " + maxWorkerThreadPoolSize + " (expected: > 0)"); } this.maxWorkerThreadPoolSize = maxWorkerThreadPoolSize; } }
Configuration { public void setMaxWorkerThreadPoolSize(int maxWorkerThreadPoolSize) { if (maxWorkerThreadPoolSize <= 0) { throw new IllegalArgumentException("maxWorkerThreadPoolSize: " + maxWorkerThreadPoolSize + " (expected: > 0)"); } this.maxWorkerThreadPoolSize = maxWorkerThreadPoolSize; } Configuration(); }
Configuration { public void setMaxWorkerThreadPoolSize(int maxWorkerThreadPoolSize) { if (maxWorkerThreadPoolSize <= 0) { throw new IllegalArgumentException("maxWorkerThreadPoolSize: " + maxWorkerThreadPoolSize + " (expected: > 0)"); } this.maxWorkerThreadPoolSize = maxWorkerThreadPoolSize; } Configuration(); void setMetricsPrefix(String metricsPrefix); @JsonSetter("purgeFilterIntervalMillis") void setPurgeFilterInterval(int purgeFilterIntervalMillis); void setMaxHttpConnections(int maxHttpConnections); void setMaxHttpRequestLength(int maxHttpRequestLength); void setMaxWorkerThreadPoolSize(int maxWorkerThreadPoolSize); @JsonSetter("requestTimeoutSeconds") void setRequestTimeout(int requestTimeoutSeconds); void setIdleTimeoutMillis(int idleTimeoutMillis); void setDefaultExpectedInsertions(int defaultExpectedInsertions); void setDefaultFalsePositiveProbability(double defaultFalsePositiveProbability); @JsonSetter("defaultValidSecondsAfterCreate") void setDefaultValidPeriodAfterCreate(long defaultValidSecondsAfterCreate); void setChannelBufferSizeForFilterPersistence(int channelBufferSizeForFilterPersistence); void setPersistentStorageDirectory(@Nullable String persistentStorageDirectory); void setAllowRecoverFromCorruptedPersistentFile(boolean allowRecoverFromCorruptedPersistentFile); void setChannelOptions(SupportedChannelOptions channelOptions); @JsonProperty("triggerPersistenceCriteria") void setPersistenceCriteria(@Nullable List<TriggerPersistenceCriteria> criteriaList); void setGracefulShutdownQuietPeriodMillis(long gracefulShutdownQuietPeriodMillis); void setGracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis); }
Configuration { public void setMaxWorkerThreadPoolSize(int maxWorkerThreadPoolSize) { if (maxWorkerThreadPoolSize <= 0) { throw new IllegalArgumentException("maxWorkerThreadPoolSize: " + maxWorkerThreadPoolSize + " (expected: > 0)"); } this.maxWorkerThreadPoolSize = maxWorkerThreadPoolSize; } Configuration(); void setMetricsPrefix(String metricsPrefix); @JsonSetter("purgeFilterIntervalMillis") void setPurgeFilterInterval(int purgeFilterIntervalMillis); void setMaxHttpConnections(int maxHttpConnections); void setMaxHttpRequestLength(int maxHttpRequestLength); void setMaxWorkerThreadPoolSize(int maxWorkerThreadPoolSize); @JsonSetter("requestTimeoutSeconds") void setRequestTimeout(int requestTimeoutSeconds); void setIdleTimeoutMillis(int idleTimeoutMillis); void setDefaultExpectedInsertions(int defaultExpectedInsertions); void setDefaultFalsePositiveProbability(double defaultFalsePositiveProbability); @JsonSetter("defaultValidSecondsAfterCreate") void setDefaultValidPeriodAfterCreate(long defaultValidSecondsAfterCreate); void setChannelBufferSizeForFilterPersistence(int channelBufferSizeForFilterPersistence); void setPersistentStorageDirectory(@Nullable String persistentStorageDirectory); void setAllowRecoverFromCorruptedPersistentFile(boolean allowRecoverFromCorruptedPersistentFile); void setChannelOptions(SupportedChannelOptions channelOptions); @JsonProperty("triggerPersistenceCriteria") void setPersistenceCriteria(@Nullable List<TriggerPersistenceCriteria> criteriaList); void setGracefulShutdownQuietPeriodMillis(long gracefulShutdownQuietPeriodMillis); void setGracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis);  }