directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject svn commit: r471550 - /directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java
Date Sun, 05 Nov 2006 22:43:57 GMT
Author: proyal
Date: Sun Nov  5 14:43:56 2006
New Revision: 471550

URL: http://svn.apache.org/viewvc?view=rev&rev=471550
Log:
generics

Modified:
    directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java

Modified: directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java?view=diff&rev=471550&r1=471549&r2=471550
==============================================================================
--- directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java
(original)
+++ directory/branches/mina/1.2/core/src/main/java/org/apache/mina/common/ExecutorThreadModel.java
Sun Nov  5 14:43:56 2006
@@ -21,17 +21,15 @@
 
 import java.util.HashMap;
 import java.util.Map;
-
-import org.apache.mina.filter.executor.ExecutorFilter;
-
 import java.util.concurrent.Executor;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.mina.filter.executor.ExecutorFilter;
+
 /**
  * A {@link ThreadModel} which represents a thread model with an {@link Executor}
- * (from <a href="http://dcl.mathcs.emory.edu/util/backport-util-concurrent/">backport-util-concurrent</a>)
  * per service.  The default underlying {@link Executor} is {@link ThreadPoolExecutor},
  * so you can safely downcast the returned {@link Executor} of {@link #getExecutor()} to
  * {@link ThreadPoolExecutor} by default.
@@ -45,7 +43,7 @@
      * Maps a service name to a PooledThreadModel instance.
      * Without this map, we might create extremely many thread pools that leads the system
to
      * coma. */
-    private static final Map service2model = new HashMap();
+    private static final Map<String,ExecutorThreadModel> service2model = new HashMap<String,
ExecutorThreadModel>();
 
     /**
      * Returns a {@link ExecutorThreadModel} instance for the specified <tt>serviceName</tt>.
@@ -65,7 +63,7 @@
         ExecutorThreadModel model;
         synchronized( service2model )
         {
-            model = ( ExecutorThreadModel ) service2model.get( serviceName );
+            model = service2model.get( serviceName );
             if( model == null )
             {
                 model = new ExecutorThreadModel( serviceName );



Mime
View raw message