reschedule threads sooner
diff --git a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
index 59e6f46..263ee10 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
@@ -126,7 +126,7 @@
new LinkedList<IFlowEntry>();
//
- // Fetch all Flow Entries and select only my Flow Entries
+ // Fetch all Flow Entries which need to be updated and select only my Flow Entries
// that need to be updated into the switches.
//
boolean processed_measurement_flow = false;
@@ -488,9 +488,9 @@
nextFlowEntryIdPrefix = randomGenerator.nextInt();
mapReaderScheduler.scheduleAtFixedRate(
- mapReader, 3, 3, TimeUnit.SECONDS);
+ mapReader, 100, 100, TimeUnit.MILLISECONDS);
shortestPathReconcileScheduler.scheduleAtFixedRate(
- shortestPathReconcile, 3, 3, TimeUnit.SECONDS);
+ shortestPathReconcile, 100, 100, TimeUnit.MILLISECONDS);
}
/**
diff --git a/src/main/java/net/floodlightcontroller/onoslistener/OnosPublisher.java b/src/main/java/net/floodlightcontroller/onoslistener/OnosPublisher.java
index e07196f..723fe1c 100644
--- a/src/main/java/net/floodlightcontroller/onoslistener/OnosPublisher.java
+++ b/src/main/java/net/floodlightcontroller/onoslistener/OnosPublisher.java
@@ -67,6 +67,7 @@
catch (Exception e) {
log.error("Error in cleanup thread", e);
} finally {
+ conn.close();
cleanupTask.reschedule(CLEANUP_TASK_INTERVAL,
TimeUnit.SECONDS);
}
@@ -85,8 +86,8 @@
}
protected void switchCleanup() {
- TopoSwitchServiceImpl impl = new TopoSwitchServiceImpl();
- Iterable<ISwitchObject> switches = impl.getActiveSwitches();
+ conn.close();
+ Iterable<ISwitchObject> switches = conn.utils().getActiveSwitches(conn);
log.debug("Checking for inactive switches");
// For each switch check if a controller exists in controller registry
@@ -109,6 +110,7 @@
e.printStackTrace();
}
}
+ conn.close();
}
@Override