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/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
index 0adc1cb..6e0adbc 100644
--- a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
+++ b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
@@ -125,7 +125,7 @@
Executors.newFixedThreadPool(32, groupedThreads("onos/flowservice", "device-installer-%d", log));
protected ExecutorService operationsService =
- Executors.newFixedThreadPool(32, groupedThreads("onos/flowservice", "operations-%d, log"));
+ Executors.newFixedThreadPool(32, groupedThreads("onos/flowservice", "operations-%d", log));
private IdGenerator idGenerator;
@@ -294,7 +294,7 @@
@Override
public void apply(FlowRuleOperations ops) {
checkPermission(FLOWRULE_WRITE);
- operationsService.submit(new FlowOperationsProcessor(ops));
+ operationsService.execute(new FlowOperationsProcessor(ops));
}
@Override
@@ -623,14 +623,14 @@
final FlowRuleBatchOperation b = new FlowRuleBatchOperation(perDeviceBatches.get(deviceId),
deviceId, id);
pendingFlowOperations.put(id, this);
- deviceInstallers.submit(() -> store.storeBatch(b));
+ deviceInstallers.execute(() -> store.storeBatch(b));
}
}
public void satisfy(DeviceId devId) {
pendingDevices.remove(devId);
if (pendingDevices.isEmpty()) {
- operationsService.submit(this);
+ operationsService.execute(this);
}
}
@@ -640,7 +640,7 @@
hasFailed.set(true);
pendingDevices.remove(devId);
if (pendingDevices.isEmpty()) {
- operationsService.submit(this);
+ operationsService.execute(this);
}
if (context != null) {