removing StratosThreadFactory
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/864b4d91 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/864b4d91 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/864b4d91 Branch: refs/heads/stratos-4.1.x Commit: 864b4d91580903e49f60a5bc1e5e8b2bfb4ca4b4 Parents: e539832 Author: Isuru Haththotuwa <[email protected]> Authored: Fri Dec 4 05:40:09 2015 +0530 Committer: Isuru Haththotuwa <[email protected]> Committed: Mon Dec 7 18:48:09 2015 +0530 ---------------------------------------------------------------------- .../common/threading/StratosThreadFactory.java | 37 -------------------- .../common/threading/StratosThreadPool.java | 4 +-- 2 files changed, 2 insertions(+), 39 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/864b4d91/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/threading/StratosThreadFactory.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/threading/StratosThreadFactory.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/threading/StratosThreadFactory.java deleted file mode 100644 index df3bcae..0000000 --- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/threading/StratosThreadFactory.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.stratos.common.threading; - -import java.util.concurrent.ThreadFactory; - -public class StratosThreadFactory implements ThreadFactory { - - private String prefix; - private int counter; - - public StratosThreadFactory(String prefix) { - this.prefix = prefix; - this.counter = 0; - } - - public Thread newThread(Runnable r) { - return new Thread(r, prefix + "-" + (++counter)); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/864b4d91/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/threading/StratosThreadPool.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/threading/StratosThreadPool.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/threading/StratosThreadPool.java index 279167e..d4531e2 100644 --- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/threading/StratosThreadPool.java +++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/threading/StratosThreadPool.java @@ -50,7 +50,7 @@ public class StratosThreadPool { if (executorService == null) { synchronized (executorServiceMapLock) { if (executorService == null) { - executorService = Executors.newFixedThreadPool(threadPoolSize, new StratosThreadFactory(identifier)); + executorService = Executors.newFixedThreadPool(threadPoolSize); executorServiceMap.put(identifier, executorService); log.info(String.format("Thread pool created: [type] Executor Service [id] %s [size] %d", identifier, threadPoolSize)); } @@ -71,7 +71,7 @@ public class StratosThreadPool { if (scheduledExecutorService == null) { synchronized (scheduledServiceMapLock) { if (scheduledExecutorService == null) { - scheduledExecutorService = Executors.newScheduledThreadPool(threadPoolSize, new StratosThreadFactory(identifier)); + scheduledExecutorService = Executors.newScheduledThreadPool(threadPoolSize); scheduledServiceMap.put(identifier, scheduledExecutorService); log.info(String.format("Thread pool created: [type] Scheduled Executor Service [id] %s [size] %d", identifier, threadPoolSize));
