org.apache.continuum.taskqueue.manager
Class DefaultTaskQueueManager

java.lang.Object
  extended by org.apache.continuum.taskqueue.manager.DefaultTaskQueueManager
All Implemented Interfaces:
TaskQueueManager, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

public class DefaultTaskQueueManager
extends Object
implements TaskQueueManager, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

Author:
Maria Catherine Tan

Field Summary
 
Fields inherited from interface org.apache.continuum.taskqueue.manager.TaskQueueManager
ROLE
 
Constructor Summary
DefaultTaskQueueManager()
           
 
Method Summary
 void contextualize(org.codehaus.plexus.context.Context context)
           
 List<PrepareBuildProjectsTask> getDistributedBuildProjectsInQueue()
           
 org.codehaus.plexus.taskqueue.TaskQueue getDistributedBuildQueue()
           
 org.codehaus.plexus.taskqueue.TaskQueue getPurgeQueue()
           
 boolean isInDistributedBuildQueue(int projectGroupId, String scmRootAddress)
           
 boolean isInPurgeQueue(int purgeConfigId)
           
 boolean isProjectInReleaseStage(String releaseId)
          Check whether a project is in the release stage based on the given releaseId.
 boolean isRepositoryInPurgeQueue(int repositoryId)
          Check if the repository is already in the purging queue
 boolean isRepositoryInUse(int repositoryId)
          Check if the repository is being used by a project that is currently building
 boolean releaseInProgress()
           
 void removeFromDistributedBuildQueue(int projectGroupId, String scmRootAddress)
           
 boolean removeFromPurgeQueue(int purgeConfigId)
          Remove local repository from the purge queue
 boolean removeFromPurgeQueue(int[] purgeConfigIds)
          Remove local repositories from the purge queue
 void removeRepositoryFromPurgeQueue(int repositoryId)
          Remove local repository from the purge queue
 void removeTasksFromDistributedBuildQueueWithHashCodes(int[] hashCodes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTaskQueueManager

public DefaultTaskQueueManager()
Method Detail

getDistributedBuildQueue

public org.codehaus.plexus.taskqueue.TaskQueue getDistributedBuildQueue()

getDistributedBuildProjectsInQueue

public List<PrepareBuildProjectsTask> getDistributedBuildProjectsInQueue()
                                                                  throws TaskQueueManagerException
Throws:
TaskQueueManagerException

getPurgeQueue

public org.codehaus.plexus.taskqueue.TaskQueue getPurgeQueue()
Specified by:
getPurgeQueue in interface TaskQueueManager

isInDistributedBuildQueue

public boolean isInDistributedBuildQueue(int projectGroupId,
                                         String scmRootAddress)
                                  throws TaskQueueManagerException
Throws:
TaskQueueManagerException

isInPurgeQueue

public boolean isInPurgeQueue(int purgeConfigId)
                       throws TaskQueueManagerException
Specified by:
isInPurgeQueue in interface TaskQueueManager
Throws:
TaskQueueManagerException

isRepositoryInPurgeQueue

public boolean isRepositoryInPurgeQueue(int repositoryId)
                                 throws TaskQueueManagerException
Description copied from interface: TaskQueueManager
Check if the repository is already in the purging queue

Specified by:
isRepositoryInPurgeQueue in interface TaskQueueManager
Parameters:
repositoryId - the id of the repository purge configuration
Returns:
true if the repository is in the purging queue, otherwise false
Throws:
TaskQueueManagerException

isRepositoryInUse

public boolean isRepositoryInUse(int repositoryId)
                          throws TaskQueueManagerException
Description copied from interface: TaskQueueManager
Check if the repository is being used by a project that is currently building

Specified by:
isRepositoryInUse in interface TaskQueueManager
Parameters:
repositoryId - the id of the local repository
Returns:
true if the repository is in use, otherwise false
Throws:
TaskQueueManagerException

isProjectInReleaseStage

public boolean isProjectInReleaseStage(String releaseId)
                                throws TaskQueueManagerException
Description copied from interface: TaskQueueManager
Check whether a project is in the release stage based on the given releaseId.

Specified by:
isProjectInReleaseStage in interface TaskQueueManager
Returns:
Throws:
TaskQueueManagerException

releaseInProgress

public boolean releaseInProgress()
                          throws TaskQueueManagerException
Specified by:
releaseInProgress in interface TaskQueueManager
Throws:
TaskQueueManagerException

removeFromDistributedBuildQueue

public void removeFromDistributedBuildQueue(int projectGroupId,
                                            String scmRootAddress)
                                     throws TaskQueueManagerException
Throws:
TaskQueueManagerException

removeFromPurgeQueue

public boolean removeFromPurgeQueue(int purgeConfigId)
                             throws TaskQueueManagerException
Description copied from interface: TaskQueueManager
Remove local repository from the purge queue

Specified by:
removeFromPurgeQueue in interface TaskQueueManager
Parameters:
purgeConfigId - the id of the purge configuration
Returns:
true if the purge configuration was successfully removed from the purge queue, otherwise false
Throws:
TaskQueueManagerException

removeFromPurgeQueue

public boolean removeFromPurgeQueue(int[] purgeConfigIds)
                             throws TaskQueueManagerException
Description copied from interface: TaskQueueManager
Remove local repositories from the purge queue

Specified by:
removeFromPurgeQueue in interface TaskQueueManager
Parameters:
purgeConfigIds - the ids of the purge configuration
Returns:
true if the purge configurations were successfully removed from the purge queue, otherwise false
Throws:
TaskQueueManagerException

removeRepositoryFromPurgeQueue

public void removeRepositoryFromPurgeQueue(int repositoryId)
                                    throws TaskQueueManagerException
Description copied from interface: TaskQueueManager
Remove local repository from the purge queue

Specified by:
removeRepositoryFromPurgeQueue in interface TaskQueueManager
Parameters:
repositoryId - the id of the local repository
Throws:
TaskQueueManagerException

removeTasksFromDistributedBuildQueueWithHashCodes

public void removeTasksFromDistributedBuildQueueWithHashCodes(int[] hashCodes)
                                                       throws TaskQueueManagerException
Throws:
TaskQueueManagerException

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException
Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.