continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ken...@apache.org
Subject svn commit: r439593 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
Date Sat, 02 Sep 2006 13:37:39 GMT
Author: kenney
Date: Sat Sep  2 06:37:39 2006
New Revision: 439593

URL: http://svn.apache.org/viewvc?rev=439593&view=rev
Log:
Added some documentation

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java?rev=439593&r1=439592&r2=439593&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
Sat Sep  2 06:37:39 2006
@@ -19,10 +19,10 @@
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.plexus.taskqueue.TaskViabilityEvaluator;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -45,8 +45,19 @@
     // TaskViabilityEvaluator Implementation
     // ----------------------------------------------------------------------
 
-    public List evaluate( List tasks )
-        throws TaskQueueException
+    /**
+     * Removes duplicate tasks from the list. A duplicate task is one with the same
+     * build definition and that's scheduled within the required build interval.
+     *
+     * <p>
+     * &forall; <sub>t1, t2 &isin; tasks</sub> [ t1 &ne; t2 &and;
t2.buildDefinition = t2.buildDefinition]:
+     *  if ( t2.timestamp - t1.timestamp < requiredBuildInterval ) remove( t2 ).
+     * </p>
+     *
+     * @param tasks A list of queued tasks to evaluate
+     * @return a list of tasks with duplicates removed
+     */
+    public Collection evaluate( Collection tasks )
     {
         // ----------------------------------------------------------------------
         // This code makes a Map with Lists with one list per project. For each



Mime
View raw message