maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r746163 - /maven/components/branches/maven-2.1.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
Date Fri, 20 Feb 2009 06:18:42 GMT
Author: brett
Date: Fri Feb 20 06:18:41 2009
New Revision: 746163

URL: http://svn.apache.org/viewvc?rev=746163&view=rev
Log:
just use a fixed pool size, it appears it won't queue up the 4th artifact anyway if you have
varying size

Modified:
    maven/components/branches/maven-2.1.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java

Modified: maven/components/branches/maven-2.1.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java?rev=746163&r1=746162&r2=746163&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
(original)
+++ maven/components/branches/maven-2.1.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
Fri Feb 20 06:18:41 2009
@@ -29,6 +29,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.Executors;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -61,6 +62,8 @@
     // Components
     // ----------------------------------------------------------------------
 
+    private static final int DEFAULT_POOL_SIZE = 5;
+
     private WagonManager wagonManager;
 
     private ArtifactTransformationManager transformationManager;
@@ -73,7 +76,9 @@
     public DefaultArtifactResolver()
     {
         super();
-        resolveArtifactPool = new ThreadPoolExecutor( 3, 5, 3, TimeUnit.SECONDS, new LinkedBlockingQueue()
);
+        resolveArtifactPool = 
+            new ThreadPoolExecutor( DEFAULT_POOL_SIZE, DEFAULT_POOL_SIZE, 3, TimeUnit.SECONDS,
+                                    new LinkedBlockingQueue() );
     }
 
     // ----------------------------------------------------------------------



Mime
View raw message