log uncaught Exception
- Use execute instead of submit so that uncaught Exception will
be dealt and logged by ExecutorService's handler.
- Use component's own logger
Change-Id: I761264aea00748980929b5048e111756776dd2f6
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java
index f4bb0d0..2f5bc0a 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java
@@ -218,7 +218,7 @@
} else {
// should be a normal executor; it's used for receiving messages
this.executor =
- Executors.newFixedThreadPool(8, groupedThreads("onos/ecm", mapName + "-fg-%d"));
+ Executors.newFixedThreadPool(8, groupedThreads("onos/ecm", mapName + "-fg-%d", log));
}
if (communicationExecutor != null) {
@@ -227,7 +227,7 @@
// sending executor; should be capped
//TODO this probably doesn't need to be bounded anymore
this.communicationExecutor =
- newFixedThreadPool(8, groupedThreads("onos/ecm", mapName + "-publish-%d"));
+ newFixedThreadPool(8, groupedThreads("onos/ecm", mapName + "-publish-%d", log));
}
@@ -235,7 +235,7 @@
this.backgroundExecutor = backgroundExecutor;
} else {
this.backgroundExecutor =
- newSingleThreadScheduledExecutor(groupedThreads("onos/ecm", mapName + "-bg-%d"));
+ newSingleThreadScheduledExecutor(groupedThreads("onos/ecm", mapName + "-bg-%d", log));
}
// start anti-entropy thread
@@ -718,7 +718,7 @@
Map<K, UpdateEntry<K, V>> map = Maps.newHashMap();
items.forEach(item -> map.compute(item.key(), (key, existing) ->
item.isNewerThan(existing) ? item : existing));
- communicationExecutor.submit(() -> {
+ communicationExecutor.execute(() -> {
clusterCommunicator.unicast(ImmutableList.copyOf(map.values()),
updateMessageSubject,
serializer::encode,