Brian O'Connor

Changing IntentManager to use groupedThreads

Change-Id: I83854c2d6d6fcc8b10a0f50e625aa4be5ff255bb
...@@ -75,8 +75,8 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -75,8 +75,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
75 import static com.google.common.base.Preconditions.checkState; 75 import static com.google.common.base.Preconditions.checkState;
76 import static java.util.concurrent.Executors.newFixedThreadPool; 76 import static java.util.concurrent.Executors.newFixedThreadPool;
77 import static java.util.concurrent.Executors.newSingleThreadExecutor; 77 import static java.util.concurrent.Executors.newSingleThreadExecutor;
78 +import static org.onlab.util.Tools.groupedThreads;
78 import static org.onlab.util.Tools.isNullOrEmpty; 79 import static org.onlab.util.Tools.isNullOrEmpty;
79 -import static org.onlab.util.Tools.namedThreads;
80 import static org.onosproject.net.intent.IntentState.*; 80 import static org.onosproject.net.intent.IntentState.*;
81 import static org.slf4j.LoggerFactory.getLogger; 81 import static org.slf4j.LoggerFactory.getLogger;
82 82
...@@ -138,8 +138,8 @@ public class IntentManager ...@@ -138,8 +138,8 @@ public class IntentManager
138 store.setDelegate(delegate); 138 store.setDelegate(delegate);
139 trackerService.setDelegate(topoDelegate); 139 trackerService.setDelegate(topoDelegate);
140 eventDispatcher.addSink(IntentEvent.class, listenerRegistry); 140 eventDispatcher.addSink(IntentEvent.class, listenerRegistry);
141 - batchExecutor = newSingleThreadExecutor(namedThreads("onos-intent-batch")); 141 + batchExecutor = newSingleThreadExecutor(groupedThreads("onos/intent", "batch"));
142 - workerExecutor = newFixedThreadPool(NUM_THREADS, namedThreads("onos-intent-worker-%d")); 142 + workerExecutor = newFixedThreadPool(NUM_THREADS, groupedThreads("onos/intent", "worker-%d"));
143 idGenerator = coreService.getIdGenerator("intent-ids"); 143 idGenerator = coreService.getIdGenerator("intent-ids");
144 Intent.bindIdGenerator(idGenerator); 144 Intent.bindIdGenerator(idGenerator);
145 log.info("Started"); 145 log.info("Started");
......