Controller now uses the registry module to enable fault tolerance\!
diff --git a/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java b/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java
index 1695451..df99354 100644
--- a/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java
+++ b/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java
@@ -60,7 +60,9 @@
protected Map<String, ControlChangeCallback> switchCallbacks;
protected Map<String, PathChildrenCache> switchPathCaches;
- //protected boolean zookeeperEnabled = false;
+ //Performance-related configuration
+ protected static final int sessionTimeout = 2000;
+ protected static final int connectionTimeout = 4000;
protected class ParamaterizedCuratorWatcher implements CuratorWatcher {
private String dpid;
@@ -455,7 +457,8 @@
switchPathCaches = new HashMap<String, PathChildrenCache>();
RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
- client = CuratorFrameworkFactory.newClient(connectionString, retryPolicy);
+ client = CuratorFrameworkFactory.newClient(connectionString,
+ sessionTimeout, connectionTimeout, retryPolicy);
client.start();