fixed code template and format

This commit is contained in:
agapple
2015-04-28 21:11:41 +08:00
parent ea889cb004
commit 7ebb3fd1ab
86 changed files with 2763 additions and 3554 deletions

View File

@@ -44,8 +44,10 @@ public class CanalConnectors {
*/
public static CanalConnector newClusterConnector(List<? extends SocketAddress> addresses, String destination,
String username, String password) {
ClusterCanalConnector canalConnector = new ClusterCanalConnector(username, password, destination,
new SimpleNodeAccessStrategy(addresses));
ClusterCanalConnector canalConnector = new ClusterCanalConnector(username,
password,
destination,
new SimpleNodeAccessStrategy(addresses));
canalConnector.setSoTimeout(30 * 1000);
return canalConnector;
}
@@ -61,13 +63,10 @@ public class CanalConnectors {
*/
public static CanalConnector newClusterConnector(String zkServers, String destination, String username,
String password) {
ClusterCanalConnector canalConnector = new ClusterCanalConnector(
username,
password,
destination,
new ClusterNodeAccessStrategy(
destination,
ZkClientx.getZkClient(zkServers)));
ClusterCanalConnector canalConnector = new ClusterCanalConnector(username,
password,
destination,
new ClusterNodeAccessStrategy(destination, ZkClientx.getZkClient(zkServers)));
canalConnector.setSoTimeout(30 * 1000);
return canalConnector;
}

View File

@@ -102,7 +102,7 @@ public class SimpleCanalConnector implements CanalConnector {
rollback();
}
}
connected = true;
}
@@ -411,7 +411,6 @@ public class SimpleCanalConnector implements CanalConnector {
}
}
private void waitClientRunning() {
try {
if (zkClientx != null) {