package com.walker.web;
|
|
public class RestTemplateConfig {
|
|
public int getMaxIdleConnections() {
|
return maxIdleConnections;
|
}
|
|
public void setMaxIdleConnections(int maxIdleConnections) {
|
this.maxIdleConnections = maxIdleConnections;
|
}
|
|
public long getKeepAliveDurationSeconds() {
|
return keepAliveDurationSeconds;
|
}
|
|
public void setKeepAliveDurationSeconds(long keepAliveDurationSeconds) {
|
this.keepAliveDurationSeconds = keepAliveDurationSeconds;
|
}
|
|
public long getConnectTimeoutSeconds() {
|
return connectTimeoutSeconds;
|
}
|
|
public void setConnectTimeoutSeconds(long connectTimeoutSeconds) {
|
this.connectTimeoutSeconds = connectTimeoutSeconds;
|
}
|
|
public long getReadTimeoutSeconds() {
|
return readTimeoutSeconds;
|
}
|
|
public void setReadTimeoutSeconds(long readTimeoutSeconds) {
|
this.readTimeoutSeconds = readTimeoutSeconds;
|
}
|
|
public long getWriteTimeoutSeconds() {
|
return writeTimeoutSeconds;
|
}
|
|
public void setWriteTimeoutSeconds(long writeTimeoutSeconds) {
|
this.writeTimeoutSeconds = writeTimeoutSeconds;
|
}
|
|
// 连接池中整体的空闲连接的最大数量
|
private int maxIdleConnections = 100;
|
// 连接空闲时间最多为 300 秒
|
private long keepAliveDurationSeconds = 300;
|
// 连接超时(秒)
|
private long connectTimeoutSeconds = 3;
|
// 读超时(秒)
|
private long readTimeoutSeconds = 3;
|
// 写超时(秒)
|
private long writeTimeoutSeconds = 3;
|
}
|