feature: add socket connection pool

This commit is contained in:
tanyawen
2019-12-27 21:41:10 +08:00
parent 70c292f0fc
commit 3ad9f94a69
12 changed files with 516 additions and 88 deletions
@@ -28,7 +28,7 @@ public class StorageServer extends TrackerServer {
* @param store_path the store path index on the storage server
*/
public StorageServer(String ip_addr, int port, int store_path) throws IOException {
super(ClientGlobal.getSocket(ip_addr, port), new InetSocketAddress(ip_addr, port));
super(new InetSocketAddress(ip_addr, port));
this.store_path_index = store_path;
}
@@ -40,7 +40,7 @@ public class StorageServer extends TrackerServer {
* @param store_path the store path index on the storage server
*/
public StorageServer(String ip_addr, int port, byte store_path) throws IOException {
super(ClientGlobal.getSocket(ip_addr, port), new InetSocketAddress(ip_addr, port));
super(new InetSocketAddress(ip_addr, port));
if (store_path < 0) {
this.store_path_index = 256 + store_path;
} else {