Cleaning-up shared executors use of metrics service.
Change-Id: I4293df87cd46e9f22cbdf03cfbced9a21ba85de7
diff --git a/core/net/src/main/java/org/onosproject/core/impl/CoreManager.java b/core/net/src/main/java/org/onosproject/core/impl/CoreManager.java
index a8405dd..2b44b2a 100644
--- a/core/net/src/main/java/org/onosproject/core/impl/CoreManager.java
+++ b/core/net/src/main/java/org/onosproject/core/impl/CoreManager.java
@@ -101,7 +101,7 @@
@Activate
- public void activate() {
+ protected void activate() {
registerApplication(CORE_APP_NAME);
cfgService.registerProperties(getClass());
try {
@@ -117,7 +117,7 @@
}
@Deactivate
- public void deactivate() {
+ protected void deactivate() {
cfgService.unregisterProperties(getClass(), false);
SharedExecutors.shutdown();
}
@@ -171,7 +171,7 @@
@Modified
- public void modified(ComponentContext context) {
+ protected void modified(ComponentContext context) {
Dictionary<?, ?> properties = context.getProperties();
Integer poolSize = Tools.getIntegerProperty(properties, "sharedThreadPoolSize");
@@ -193,7 +193,7 @@
Boolean performanceCheck = Tools.isPropertyEnabled(properties, "sharedThreadPerformanceCheck");
if (performanceCheck != null) {
calculatePoolPerformance = performanceCheck;
- SharedExecutors.setCalculatePoolPerformance(calculatePoolPerformance, metricsService);
+ SharedExecutors.setMetricsService(calculatePoolPerformance ? metricsService : null);
}
log.info("Settings: sharedThreadPoolSize={}, maxEventTimeLimit={}, calculatePoolPerformance={}",