com.linkedin.restli.client.ParSeqRestliClientConfigBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parseq-restli-client Show documentation
Show all versions of parseq-restli-client Show documentation
Uploads all artifacts belonging to configuration ':parseq-restli-client:archives'
package com.linkedin.restli.client;
import java.util.HashMap;
import java.util.Map;
public class ParSeqRestliClientConfigBuilder {
private final Map _timeoutMsConfig = new HashMap<>();
private final Map _batchingEnabledConfig = new HashMap<>();
private final Map _maxBatchSizeConfig = new HashMap<>();
public ParSeqRestliClientConfigBuilder() {
}
public ParSeqRestliClientConfigBuilder(ParSeqRestliClientConfig config) {
addConfig(config);
}
public void addConfig(ParSeqRestliClientConfig config) {
addTimeoutMsConfigMap(config.getTimeoutMsConfig());
addBatchingEnabledConfigMap(config.isBatchingEnabledConfig());
addMaxBatchSizeConfigMap(config.getMaxBatchSizeConfig());
}
public ParSeqRestliClientConfig build() {
return new ParSeqRestliClientConfigImpl(_timeoutMsConfig, _batchingEnabledConfig, _maxBatchSizeConfig);
}
public ParSeqRestliClientConfigBuilder addTimeoutMs(String key, long value) {
_timeoutMsConfig.put(key, value);
return this;
}
public ParSeqRestliClientConfigBuilder addTimeoutMsConfigMap(Map config) {
_timeoutMsConfig.putAll(config);
return this;
}
public ParSeqRestliClientConfigBuilder addBatchingEnabled(String key, boolean value) {
_batchingEnabledConfig.put(key, value);
return this;
}
public ParSeqRestliClientConfigBuilder addBatchingEnabledConfigMap(Map config) {
_batchingEnabledConfig.putAll(config);
return this;
}
public ParSeqRestliClientConfigBuilder addMaxBatchSize(String key, int value) {
_maxBatchSizeConfig.put(key, value);
return this;
}
public ParSeqRestliClientConfigBuilder addMaxBatchSizeConfigMap(Map config) {
_maxBatchSizeConfig.putAll(config);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy