Merge branch 'master' into RAMCloud
Conflicts:
conf/onos.properties
src/main/java/net/onrc/onos/flow/FlowManagerImpl.java
src/main/java/net/onrc/onos/graph/LocalTopologyEventListener.java
src/main/java/net/onrc/onos/ofcontroller/bgproute/BgpRoute.java
src/main/java/net/onrc/onos/ofcontroller/core/ILinkStorage.java
src/main/java/net/onrc/onos/ofcontroller/core/ISwitchStorage.java
src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
src/main/java/net/onrc/onos/ofcontroller/core/internal/LinkStorageImpl.java
src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
src/main/java/net/onrc/onos/ofcontroller/floodlightlistener/NetworkGraphPublisher.java
src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
src/main/java/net/onrc/onos/ofcontroller/topology/ShortestPath.java
src/main/java/net/onrc/onos/ofcontroller/topology/web/RouteResource.java
src/test/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImplTest.java
src/test/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImplTestBB.java
src/test/java/net/onrc/onos/ofcontroller/devicemanager/internal/DeviceStorageImplTest.java
src/test/java/net/onrc/onos/ofcontroller/topology/TopologyManagerTest.java
diff --git a/conf/hazelcast.xml b/conf/hazelcast.xml
new file mode 100644
index 0000000..11bef59
--- /dev/null
+++ b/conf/hazelcast.xml
@@ -0,0 +1,105 @@
+<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config
+ http://www.hazelcast.com/schema/config/hazelcast-config-3.0.xsd"
+ xmlns="http://www.hazelcast.com/schema/config"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <map name="*">
+
+ <!--
+ Number of sync-backups. If 1 is set as the backup-count for example,
+ then all entries of the map will be copied to another JVM for
+ ail-safety. Valid numbers are 0 (no backup), 1, 2, 3.
+ -->
+ <backup-count>0</backup-count>
+
+ <!--
+ Number of async-backups. If 1 is set as the backup-count for example,
+ then all entries of the map will be copied to another JVM for
+ fail-safety. Valid numbers are 0 (no backup), 1, 2, 3.
+ -->
+ <async-backup-count>3</async-backup-count>
+
+ <!--
+ Can we read the local backup entries? Default value is false for
+ strong consistency. Being able to read backup data will give you
+ greater performance.
+ -->
+ <read-backup-data>true</read-backup-data>
+
+ <near-cache>
+ <!--
+ Maximum size of the near cache. When max size is reached,
+ cache is evicted based on the policy defined.
+ Any integer between 0 and Integer.MAX_VALUE. 0 means
+ Integer.MAX_VALUE. Default is 0.
+ -->
+ <max-size>0</max-size>
+ <!--
+ Maximum number of seconds for each entry to stay in the near cache.
+ Entries that are older than <time-to-live-seconds> will get
+ automatically evicted from the near cache.
+ Any integer between 0 and Integer.MAX_VALUE. 0 means infinite.
+ Default is 0.
+ -->
+ <time-to-live-seconds>0</time-to-live-seconds>
+
+ <!--
+ Maximum number of seconds each entry can stay in the near cache as
+ untouched (not-read).
+ Entries that are not read (touched) more than <max-idle-seconds>
+ value will get removed from the near cache.
+ Any integer between 0 and Integer.MAX_VALUE. 0 means
+ Integer.MAX_VALUE. Default is 0.
+ -->
+ <max-idle-seconds>0</max-idle-seconds>
+
+ <!--
+ Valid values are:
+ NONE (no extra eviction, <time-to-live-seconds> may still apply),
+ LRU (Least Recently Used),
+ LFU (Least Frequently Used).
+ LRU is the default.
+ Regardless of the eviction policy used, <time-to-live-seconds> will
+ still apply.
+ -->
+ <eviction-policy>NONE</eviction-policy>
+
+ <!--
+ Should the cached entries get evicted if the entries are changed
+ (updated or removed).
+ true of false. Default is true.
+ -->
+ <invalidate-on-change>true</invalidate-on-change>
+
+ </near-cache>
+ </map>
+
+ <topic name="*">
+ <global-ordering-enabled>false</global-ordering-enabled>
+ </topic>
+
+ <network>
+ <port auto-increment="true">5701</port>
+ <join>
+ <multicast enabled="true">
+ <multicast-group>224.2.2.3</multicast-group>
+ <multicast-port>54327</multicast-port>
+ </multicast>
+ <!--
+ <tcp-ip enabled="false">
+ <member>machine1</member>
+ <member>machine2</member>
+ <member>machine3:5799</member>
+ <member>192.168.1.0-7</member>
+ <member>192.168.1.21</member>
+ </tcp-ip>
+ -->
+ <aws enabled="false">
+ </aws>
+ </join>
+ </network>
+
+ <properties>
+ <property name="hazelcast.logging.type">slf4j</property>
+ </properties>
+</hazelcast>
diff --git a/conf/onos-embedded.properties b/conf/onos-embedded.properties
index ed85223..e280e41 100644
--- a/conf/onos-embedded.properties
+++ b/conf/onos-embedded.properties
@@ -7,6 +7,10 @@
net.floodlightcontroller.counter.CounterStore,\
net.floodlightcontroller.perfmon.PktInProcessingTime,\
net.floodlightcontroller.ui.web.StaticWebRoutable,\
+net.onrc.onos.datagrid.HazelcastDatagrid,\
+net.onrc.onos.ofcontroller.flowmanager.FlowManager,\
+net.onrc.onos.ofcontroller.flowprogrammer.FlowProgrammer,\
+net.onrc.onos.ofcontroller.topology.TopologyManager,\
net.onrc.onos.registry.controller.ZookeeperRegistry
net.floodlightcontroller.restserver.RestApiServer.port = 8080
net.floodlightcontroller.core.FloodlightProvider.openflowport = 6633
@@ -14,4 +18,5 @@
net.floodlightcontroller.forwarding.Forwarding.idletimeout = 5
net.floodlightcontroller.forwarding.Forwarding.hardtimeout = 0
net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.dbconf = conf/titan-embedded.properties
+net.onrc.onos.datagrid.HazelcastDatagrid.datagridConfig = conf/hazelcast.xml
diff --git a/conf/onos.properties b/conf/onos.properties
index 7f50e6e..ada6f14 100644
--- a/conf/onos.properties
+++ b/conf/onos.properties
@@ -7,13 +7,17 @@
net.floodlightcontroller.counter.CounterStore,\
net.floodlightcontroller.perfmon.PktInProcessingTime,\
net.floodlightcontroller.ui.web.StaticWebRoutable,\
+net.onrc.onos.datagrid.HazelcastDatagrid,\
+net.onrc.onos.ofcontroller.flowmanager.FlowManager,\
+net.onrc.onos.ofcontroller.flowprogrammer.FlowProgrammer,\
+net.onrc.onos.ofcontroller.topology.TopologyManager,\
net.onrc.onos.registry.controller.ZookeeperRegistry
net.floodlightcontroller.restserver.RestApiServer.port = 8080
net.floodlightcontroller.core.FloodlightProvider.openflowport = 6633
net.floodlightcontroller.core.FloodlightProvider.workerthreads = 16
net.floodlightcontroller.forwarding.Forwarding.idletimeout = 5
net.floodlightcontroller.forwarding.Forwarding.hardtimeout = 0
-#net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.dbconf = /tmp/cassandra.titan
-net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.dbconf = /tmp/ramcloud.conf
-net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.graph_db_store = ramcloud
-
+net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.dbconf = /tmp/cassandra.titan
+net.onrc.onos.datagrid.HazelcastDatagrid.datagridConfig = conf/hazelcast.xml
+#net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.dbconf = /tmp/ramcloud.conf
+#net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.graph_db_store = ramcloud