svn commit: r930736 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r930736 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java

doogie-3
Author: doogie
Date: Sun Apr  4 19:08:40 2010
New Revision: 930736

URL: http://svn.apache.org/viewvc?rev=930736&view=rev
Log:
Remove static ExecutionPoolFactory; it was only used internally, and the
original implementation that this was based on did more, which required
it to be a separate class.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java?rev=930736&r1=930735&r2=930736&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java Sun Apr  4 19:08:40 2010
@@ -48,21 +48,15 @@ public final class ExecutionPool {
         }
     }
 
-    private static class ExecutionPoolFactory {
-        protected static ScheduledThreadPoolExecutor getExecutor(String namePrefix, int threadCount) {
-            ExecutionPoolThreadFactory threadFactory = new ExecutionPoolThreadFactory(namePrefix);
-            ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(threadCount, threadFactory);
-            executor.prestartAllCoreThreads();
-            return executor;
-        }
-    }
-
     public static ThreadFactory createThreadFactory(String namePrefix) {
         return new ExecutionPoolThreadFactory(namePrefix);
     }
 
     public static ScheduledExecutorService getExecutor(String namePrefix, int threadCount) {
-        return ExecutionPoolFactory.getExecutor(namePrefix, threadCount);
+        ExecutionPoolThreadFactory threadFactory = new ExecutionPoolThreadFactory(namePrefix);
+        ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(threadCount, threadFactory);
+        executor.prestartAllCoreThreads();
+        return executor;
     }
 
     public static ScheduledExecutorService getNewExactExecutor(String namePrefix) {