Added a temporary variable to switch between the poll-based and
the notification mechanism for the Flow Manager.
For now, the default value is the old poll-based mechanism.
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
index b1476b7..e239ae9 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
@@ -41,6 +41,12 @@
*/
public class FlowManager implements IFloodlightModule, IFlowService, INetMapStorage {
+ //
+ // TODO: A temporary variable to switch between the poll-based and
+ // notification mechanism for the Flow Manager.
+ //
+ private final static boolean enableNotifications = false;
+
protected GraphDBOperation dbHandlerApi;
protected GraphDBOperation dbHandlerInner;
@@ -506,10 +512,12 @@
// Schedule the threads and periodic tasks
flowEventHandler.start();
- mapReaderScheduler.scheduleAtFixedRate(
+ if (! enableNotifications) {
+ mapReaderScheduler.scheduleAtFixedRate(
mapReader, 3, 3, TimeUnit.SECONDS);
- shortestPathReconcileScheduler.scheduleAtFixedRate(
+ shortestPathReconcileScheduler.scheduleAtFixedRate(
shortestPathReconcile, 3, 3, TimeUnit.SECONDS);
+ }
}
/**
@@ -874,7 +882,7 @@
public void pushModifiedFlowEntriesToSwitches(
Collection<FlowPathEntryPair> modifiedFlowEntries) {
// TODO: For now, the pushing of Flow Entries is disabled
- if (true)
+ if (! enableNotifications)
return;
if (modifiedFlowEntries.isEmpty())
@@ -920,7 +928,7 @@
public void pushModifiedFlowEntriesToDatagrid(
Collection<FlowPathEntryPair> modifiedFlowEntries) {
// TODO: For now, the pushing of Flow Entries is disabled
- if (true)
+ if (! enableNotifications)
return;
if (modifiedFlowEntries.isEmpty())
@@ -987,7 +995,7 @@
public void pushModifiedFlowEntriesToDatabase(
Collection<FlowPathEntryPair> modifiedFlowEntries) {
// TODO: For now, the pushing of Flow Entries is disabled
- if (true)
+ if (! enableNotifications)
return;
if (modifiedFlowEntries.isEmpty())