continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r726611 - in /continuum/branches/continuum-parallel-builds: continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
Date Mon, 15 Dec 2008 03:32:32 GMT
Author: oching
Date: Sun Dec 14 19:32:32 2008
New Revision: 726611

URL: http://svn.apache.org/viewvc?rev=726611&view=rev
Log:
more code/comment cleanup

Modified:
    continuum/branches/continuum-parallel-builds/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
    continuum/branches/continuum-parallel-builds/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java

Modified: continuum/branches/continuum-parallel-builds/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java?rev=726611&r1=726610&r2=726611&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
Sun Dec 14 19:32:32 2008
@@ -37,19 +37,12 @@
  */
 public interface BuildsManager
 {       
-    // NOTE: deng parallel builds 
-    // I think we can move out the prepare build queue from the build manager?
-    //      only builds and checkouts should be executed in parallel? :D <-- i don't think
so :)
-    
     void buildProjects( List<Project> projects, Map<Integer, BuildDefinition>
projectsBuildDefinitionsMap, int trigger ) throws BuildManagerException;
     
     void buildProject( int projectId, BuildDefinition buildDefinition, String projectName,
int trigger ) throws BuildManagerException;
     
-    //public void prepareBuildProjects( Collection<Map<Integer, Integer>> projectsBuildDefinitions,
int trigger, int scheduleId );
-    
     void prepareBuildProject( Map<Integer, Integer> projectsBuildDefinitionsMap, int
trigger ) throws BuildManagerException;
     
-    // project checkout doesn't require dependency checking
     void checkoutProject( int projectId, String projectName, File workingDirectory, String
scmUsername, String scmPassword, BuildDefinition defaultBuildDefinition ) throws BuildManagerException;
         
     boolean cancelBuild( int projectId ) throws BuildManagerException;
@@ -97,8 +90,7 @@
     
     boolean isProjectInAnyCurrentBuild( int projectId ) throws BuildManagerException;
     
-    // TODO: deng - add the following methods (needed by QueuesAction in webapp)
-    
+    // needed in QueuesAction
     List<Task> getCurrentBuilds() throws BuildManagerException;
     
     List<Task> getCurrentCheckouts() throws BuildManagerException;

Modified: continuum/branches/continuum-parallel-builds/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java?rev=726611&r1=726610&r2=726611&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
Sun Dec 14 19:32:32 2008
@@ -58,11 +58,6 @@
     private TaskQueue checkoutQueue;
 
     /**
-     * @plexus.requirement role-hint="prepare-build-project"
-     */
-    //private TaskQueue prepareBuildQueue;
-
-    /**
      * @plexus.requirement
      */
     private BuildDefinitionDao buildDefinitionDao;
@@ -93,21 +88,6 @@
         this.name = name;
     }
 
-    /* Checkout Queue */
-
-    /*public TaskQueueExecutor getCheckoutTaskQueueExecutor()
-        throws TaskQueueManagerException
-    {
-        try
-        {
-            return (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "check-out-project"
);
-        }
-        catch ( ComponentLookupException e )
-        {
-            throw new TaskQueueManagerException( e.getMessage(), e );
-        }
-    }*/
-
     public void addToCheckoutQueue( Task checkoutTask )
         throws TaskQueueException
     {
@@ -206,94 +186,7 @@
             }
         }
     }
-
-    /* Prepare-build-projects Queue */
-
-    /*public TaskQueueExecutor getPrepareBuildTaskQueueExecutor()
-        throws ComponentLookupException
-    {        
-        return (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "prepare-build-project"
);        
-    }
-
-    public void addToPrepareBuildQueue( Task prepareBuildTask )
-        throws TaskQueueException
-    {
-        prepareBuildQueue.put( prepareBuildTask );
-    }
-
-    public void addToPrepareBuildQueue( List<Task> prepareBuildTasks )
-        throws TaskQueueException
-    {
-        for ( Task prepareBuildTask : prepareBuildTasks )
-        {
-            prepareBuildQueue.put( prepareBuildTask );
-        }
-    }
-
-    public boolean isInPrepareBuildQueue( int projectId )
-        throws TaskQueueException
-    {        
-        List<PrepareBuildProjectsTask> queue = prepareBuildQueue.getQueueSnapshot();
-
-        for ( PrepareBuildProjectsTask task : queue )
-        {
-            if ( task != null )
-            {
-                Map<Integer, Integer> map = ( (PrepareBuildProjectsTask) task ).getProjectsBuildDefinitionsMap();
-
-                if ( map.size() > 0 )
-                {
-                    Set<Integer> projectIds = map.keySet();
-
-                    if ( projectIds.contains( new Integer( projectId ) ) )
-                    {
-                        return true;
-                    }
-                }
-            }
-        }
-
-        return false;        
-    }
-
-    public boolean isCurrentPrepareBuildTaskInExecution( int projectId )
-        throws TaskQueueException
-    {
-        try
-        {
-            Task task = getPrepareBuildTaskQueueExecutor().getCurrentTask();
-    
-            if ( task != null && task instanceof PrepareBuildProjectsTask )
-            {
-                Map<Integer, Integer> map = ( (PrepareBuildProjectsTask) task ).getProjectsBuildDefinitionsMap();
     
-                if ( map.size() > 0 )
-                {
-                    Set<Integer> projectIds = map.keySet();
-    
-                    if ( projectIds.contains( new Integer( projectId ) ) )
-                    {
-                        return true;
-                    }
-                }
-            }
-        }
-        catch ( ComponentLookupException e )
-        {
-            throw new TaskQueueException( "Error looking up prepare-build-project task queue
executor." );
-        }
-        
-        return false;
-    }*/
-
-    /* Build Queue */
-
-    /*public TaskQueueExecutor getBuildTaskQueueExecutor()
-        throws ComponentLookupException
-    {   
-        return ( TaskQueueExecutor ) container.lookup( TaskQueueExecutor.class, "build-project"
);        
-    }*/
-
     public void addToBuildQueue( Task buildTask )
         throws TaskQueueException
     {



Mime
View raw message