Merge "Use Maven Enforcer plugin to require Maven version"
[controller.git] / opendaylight / config / config-manager / src / test / java / org / opendaylight / controller / config / manager / testingservices / scheduledthreadpool / TestingScheduledThreadPoolModule.java
index 77d1f8bbdfedfca2402b9c310d54cf1413f94340..e35509d09025854e6f205b65f0ba05d6778cd754 100644 (file)
@@ -12,9 +12,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
 import java.io.Closeable;
-
 import javax.annotation.Nullable;
-
 import org.opendaylight.controller.config.api.ModuleIdentifier;
 import org.opendaylight.controller.config.api.RuntimeBeanRegistratorAwareModule;
 import org.opendaylight.controller.config.api.runtime.RootRuntimeBeanRegistrator;
@@ -36,7 +34,7 @@ public class TestingScheduledThreadPoolModule implements Module,
     @Nullable
     private final TestingScheduledThreadPoolImpl oldInstance;
 
-    private final int threadCount = 10;
+    private int threadCount = 10;
     private TestingScheduledThreadPoolImpl instance;
     private RootRuntimeBeanRegistrator runtimeBeanRegistrator;
     private boolean recreate;
@@ -63,11 +61,21 @@ public class TestingScheduledThreadPoolModule implements Module,
                 "Parameter 'ThreadCount' must be greater than 0");
     }
 
+    @Override
+    public boolean canReuse(final Module oldModule) {
+        return false;
+    }
+
     @Override
     public int getThreadCount() {
         return threadCount;
     }
 
+    @Override
+    public void setThreadCount(int threadCount) {
+        this.threadCount = threadCount;
+    }
+
     @Override
     public Closeable getInstance() {
         assertNotNull(runtimeBeanRegistrator);