feature: README add connection pool config

This commit is contained in:
tanyawen
2019-12-30 22:28:08 +08:00
parent a2bbd5fe33
commit 70599a1656
2 changed files with 18 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ mvn install:install-file -DgroupId=org.csource -DartifactId=fastdfs-client-java
<dependency>
<groupId>org.csource</groupId>
<artifactId>fastdfs-client-java</artifactId>
<version>1.27-SNAPSHOT</version>
<version>1.28-SNAPSHOT</version>
</dependency>
```
@@ -53,6 +53,11 @@ http.secret_key = FastDFS1234567890
tracker_server = 10.0.11.247:22122
tracker_server = 10.0.11.248:22122
tracker_server = 10.0.11.249:22122
connection_pool.enabled = true
connection_pool.max_count_per_entry = 500
connection_pool.max_idle_time = 3600
connection_pool.max_wait_time_in_ms = 1000
```
注1tracker_server指向您自己IP地址和端口1-n个
@@ -80,6 +85,11 @@ fastdfs.http_secret_key = FastDFS1234567890
fastdfs.http_tracker_http_port = 80
fastdfs.tracker_servers = 10.0.11.201:22122,10.0.11.202:22122,10.0.11.203:22122
fastdfs.connection_pool.enabled = true
fastdfs.connection_pool.max_count_per_entry = 500
fastdfs.connection_pool.max_idle_time = 3600
fastdfs.connection_pool.max_wait_time_in_ms = 1000
```
注1properties 配置文件中属性名跟 conf 配置文件不尽相同,并且统一加前缀"fastdfs.",便于整合到用户项目配置文件
@@ -122,6 +132,10 @@ ClientGlobal.configInfo(): {
g_anti_steal_token = false
g_secret_key = FastDFS1234567890
g_tracker_http_port = 80
g_connection_pool_enabled = true
g_connection_pool_max_count_per_entry = 500
g_connection_pool_max_idle_time(ms) = 3600000
g_connection_pool_max_wait_time_in_ms(ms) = 1000
trackerServers = 10.0.11.101:22122,10.0.11.102:22122
}
```