import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.collect.Lists;
import java.io.Closeable;
import java.io.IOException;
import java.util.Collections;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
-import com.google.common.collect.Lists;
-
public class TestingFixedThreadPool implements TestingThreadPoolIfc, Closeable,
TestingModifiableThreadPoolIfc {
private final ThreadPoolExecutor executorService;
public static final List<ThreadPoolExecutor> allExecutors = Collections
.synchronizedList(Lists.<ThreadPoolExecutor>newLinkedList());
- public TestingFixedThreadPool(int threadCount, String uniqueName) {
+ public TestingFixedThreadPool(final int threadCount, final String uniqueName) {
checkNotNull(uniqueName);
this.uniqueName = uniqueName;
executorService = (ThreadPoolExecutor) Executors
}
@Override
- public void setMaximumNumberOfThreads(int activeCount) {
+ public void setMaximumNumberOfThreads(final int activeCount) {
checkArgument(activeCount > 0);
executorService.setMaximumPoolSize(activeCount);
}