Gracefully stop HT threads when the bundle is being stopped (cache terminated exception) 55/1055/1
authorAlessandro Boch <aboch@cisco.com>
Thu, 29 Aug 2013 23:58:31 +0000 (16:58 -0700)
committerAlessandro Boch <aboch@cisco.com>
Fri, 30 Aug 2013 00:05:14 +0000 (17:05 -0700)
commit6c927a9467f3b38ba6acd4e4d1631e902fbf9557
tree0304fb9a46c5771dccc6a49115ac760963aabcfb
parentc12ea8f99a69607038be30adb32a6b30ea14427f
Gracefully stop HT threads when the bundle is being stopped (cache terminated exception)

ISSUE:
When HT bundle is being stopped because container is being destroyed,
infinispan cache terminated exceptions are thrown because HT treads
during their last run are accessing terminated HT caches.
CHANGE:
- Have a stopping flag which gets set when dep mgr calls the HT stopping() method,
so that pending threads and timer tasks can be stopped before Cluster Mgr
terminates the HT caches.
- Fix other static analysis issues in HT code

Change-Id: I3eedb81f9db31c8419502d2eba02aa421616f06a
Signed-off-by: Alessandro Boch <aboch@cisco.com>
opendaylight/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/hostAware/HostNodeConnector.java
opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/Activator.java
opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java
opendaylight/hosttracker/implementation/src/test/java/org/opendaylight/controller/hosttracker/internal/HostTrackerTest.java