X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Ftestingservices%2Fparallelapsp%2FTestingParallelAPSPImpl.java;fp=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Ftestingservices%2Fparallelapsp%2FTestingParallelAPSPImpl.java;h=0000000000000000000000000000000000000000;hb=ac6f2699cd0c1e340cc32e8f0d0ca94c8e9c0cc0;hp=377a1761361123e37e2fdbee29e3743834a4155d;hpb=f43b01b81319959b1907e3e04537f5169e7f33d8;p=controller.git diff --git a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/TestingParallelAPSPImpl.java b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/TestingParallelAPSPImpl.java deleted file mode 100644 index 377a176136..0000000000 --- a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/TestingParallelAPSPImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2013, 2017 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.config.manager.testingservices.parallelapsp; - -import static com.google.common.base.Preconditions.checkArgument; - -import com.google.common.base.Strings; -import java.io.Closeable; -import java.io.IOException; -import javax.annotation.concurrent.NotThreadSafe; -import org.opendaylight.controller.config.manager.testingservices.threadpool.TestingThreadPoolIfc; - -@NotThreadSafe -public class TestingParallelAPSPImpl implements TestingAPSP, Closeable { - public static final int MINIMAL_NUMBER_OF_THREADS = 10; - private final TestingThreadPoolIfc threadPool; - private String someParam; - - public TestingParallelAPSPImpl(final TestingThreadPoolIfc threadPool, - final String someParam) { - checkArgument( - threadPool.getMaxNumberOfThreads() >= MINIMAL_NUMBER_OF_THREADS, - "Parameter 'threadPool' has not enough threads"); - checkArgument(Strings.isNullOrEmpty(someParam) == false, - "Parameter 'someParam' is blank"); - this.threadPool = threadPool; - this.someParam = someParam; - } - - @Override - public int getMaxNumberOfThreads() { - return threadPool.getMaxNumberOfThreads(); - } - - @Override - public void close() throws IOException { - - } - - TestingThreadPoolIfc getThreadPool() { - return threadPool; - } - - void setSomeParam(final String string) { - checkArgument(Strings.isNullOrEmpty(someParam) == false, - "Parameter 'someParam' is blank"); - this.someParam = string; - } - - public String getSomeParam() { - return someParam; - } -}