change config files

This commit is contained in:
YuQing
2019-12-30 20:48:09 +08:00
parent 66f3fff05e
commit 8b771e37ae
5 changed files with 16 additions and 15 deletions

View File

@@ -58,8 +58,8 @@ public class ClientGlobal {
public static final boolean DEFAULT_CONNECTION_POOL_ENABLED = false;
public static final int DEFAULT_CONNECTION_POOL_MAX_COUNT_PER_ENTRY = 100;
public static final int DEFAULT_CONNECTION_POOL_MAX_IDLE_TIME = 60 ;//second
public static final int DEFAULT_CONNECTION_POOL_MAX_WAIT_TIME_IN_MS = 5000 ;//millisecond
public static final int DEFAULT_CONNECTION_POOL_MAX_IDLE_TIME = 3600 ;//second
public static final int DEFAULT_CONNECTION_POOL_MAX_WAIT_TIME_IN_MS = 1000 ;//millisecond
public static int g_connect_timeout = DEFAULT_CONNECT_TIMEOUT * 1000; //millisecond
public static int g_network_timeout = DEFAULT_NETWORK_TIMEOUT * 1000; //millisecond

View File

@@ -23,7 +23,7 @@ public class ConnectionFactory {
sock.connect(socketAddress, ClientGlobal.g_connect_timeout);
return new Connection(sock, socketAddress);
} catch (Exception e) {
throw new MyException("connect to server, " + socketAddress.getAddress().getHostAddress() + ":" + socketAddress.getPort() + " fail, emsg:" + e.getMessage());
throw new MyException("connect to server " + socketAddress.getAddress().getHostAddress() + ":" + socketAddress.getPort() + " fail, emsg:" + e.getMessage());
}
}
}

View File

@@ -35,7 +35,7 @@ public class ConnectionManager {
/**
* free connections
*/
private LinkedList<Connection> freeConnections = new LinkedList<Connection>();
private LinkedList<Connection> freeConnections = new LinkedList<Connection>();
private ConnectionManager() {