diff options
Diffstat (limited to 'common-be/src/main/java/org/openecomp/sdc/be/workers')
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/workers/Manager.java | 18 | ||||
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/workers/Worker.java | 9 |
2 files changed, 10 insertions, 17 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/workers/Manager.java b/common-be/src/main/java/org/openecomp/sdc/be/workers/Manager.java index 2243434ce7..8f6445c21a 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/workers/Manager.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/workers/Manager.java @@ -20,22 +20,16 @@ package org.openecomp.sdc.be.workers; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.TimeUnit; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import com.google.common.util.concurrent.ThreadFactoryBuilder; +import org.openecomp.sdc.common.log.wrappers.Logger; + +import java.util.concurrent.*; /** * Created by michael on 6/24/2016. */ public class Manager<T extends Job, E> { - private static Logger log = LoggerFactory.getLogger(Manager.class.getName()); + private static Logger log = Logger.getLogger(Manager.class.getName()); private ExecutorService executor; private LinkedBlockingQueue<T> inputQueue; private LinkedBlockingQueue<E> outputQueue; @@ -46,8 +40,8 @@ public class Manager<T extends Job, E> { this.numberOfWorkers = numberOfWorkers; final ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("Worker-%d").build(); this.executor = Executors.newFixedThreadPool(numberOfWorkers, threadFactory); - this.inputQueue = new LinkedBlockingQueue<T>(); - this.outputQueue = new LinkedBlockingQueue<E>(); + this.inputQueue = new LinkedBlockingQueue<>(); + this.outputQueue = new LinkedBlockingQueue<>(); } public void addJob(T job) { diff --git a/common-be/src/main/java/org/openecomp/sdc/be/workers/Worker.java b/common-be/src/main/java/org/openecomp/sdc/be/workers/Worker.java index e8957fc9ef..cf2a6d0d6c 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/workers/Worker.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/workers/Worker.java @@ -20,13 +20,12 @@ package org.openecomp.sdc.be.workers; +import org.openecomp.sdc.be.config.BeEcompErrorManager; +import org.openecomp.sdc.common.log.wrappers.Logger; + import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import org.openecomp.sdc.be.config.BeEcompErrorManager; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * Created by michael on 6/24/2016. */ @@ -37,7 +36,7 @@ public class Worker<T extends Job<E>, E> implements Runnable { private LinkedBlockingQueue<E> outputQueue; - private static Logger log = LoggerFactory.getLogger(Worker.class.getName()); + private static Logger log = Logger.getLogger(Worker.class.getName()); public Worker(String workerName, LinkedBlockingQueue<T> inputQueue, LinkedBlockingQueue<E> outputQueue) { this.workerName = workerName; |