commit | 477e0066c3beef8f378c203a377e3ae58417e18b | [log] [tgz] |
---|---|---|
author | Pier <pierluigi.ventre@cnit.it> | Fri Apr 20 14:14:34 2018 +0200 |
committer | Pier Luigi Ventre <pierluigi.ventre@cnit.it> | Mon Apr 23 09:10:01 2018 +0000 |
tree | 742e26bd204a81c3d95cadcf7aa7cc29d16815f9 | |
parent | 10b2fee6eab880d1d3b0965d44083665952b1802 [diff] |
Improve Mcast termination Change-Id: I2855d28b374af821667e08bb3baec01f5cfd8100 (cherry picked from commit 173204690b035f1b9be36022c9dfd64f1f264123)
diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastHandler.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastHandler.java index 50d0969d..3b659bd 100644 --- a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastHandler.java +++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastHandler.java
@@ -351,7 +351,12 @@ * Clean up when deactivating the application. */ public void terminate() { + mcastEventCache.invalidateAll(); executorService.shutdown(); + mcastNextObjStore.destroy(); + mcastRoleStore.destroy(); + mcastUtils.terminate(); + log.info("Terminated"); } /** @@ -372,7 +377,6 @@ } } - /** * Process the ROUTE_ADDED event. *
diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastUtils.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastUtils.java index fc89fde..2b13370 100644 --- a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastUtils.java +++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastUtils.java
@@ -93,6 +93,13 @@ } /** + * Clean up when deactivating the application. + */ + public void terminate() { + mcastLeaderCache.clear(); + } + + /** * Get router mac using application config and the connect point. * * @param deviceId the device id