Package org.apache.continuum.builder.distributed.executor

Examples of org.apache.continuum.builder.distributed.executor.ThreadedDistributedBuildTaskQueueExecutor$ExecutorRunnable


    public void removeAgentFromTaskQueueExecutor( String buildAgentUrl)
        throws ContinuumException
    {
        log.info( "remove TaskQueueExecutor for build agent '" + buildAgentUrl + "'" );
        ThreadedDistributedBuildTaskQueueExecutor executor = taskQueueExecutors.get( buildAgentUrl );

        if ( executor == null )
        {
            return;
        }

        try
        {
            executor.stop();
            container.release( executor );
        }
        catch ( StoppingException e )
        {
            throw new ContinuumException( "Error while stopping task queue executor", e );
View Full Code Here


        taskQueueExecutors.remove( buildAgentUrl );
    }

    public boolean isBuildAgentBusy( String buildAgentUrl )
    {
        ThreadedDistributedBuildTaskQueueExecutor executor = taskQueueExecutors.get( buildAgentUrl );
       
        if ( executor != null && executor.getCurrentTask() != null )
        {
            log.info( "build agent '" + buildAgentUrl + "' is busy" );
            return true;
        }
View Full Code Here

    private void addTaskQueueExecutor( String url )
        throws ContinuumException
    {
        try
        {           
            ThreadedDistributedBuildTaskQueueExecutor taskQueueExecutor = (ThreadedDistributedBuildTaskQueueExecutor) container.
                                                                          lookup( DistributedBuildTaskQueueExecutor.class, "distributed-build-project" );
            taskQueueExecutor.setBuildAgentUrl( url );
            taskQueueExecutors.put( url, taskQueueExecutor );
        }
        catch ( ComponentLookupException e )
        {
            throw new ContinuumException( "Unable to lookup TaskQueueExecutor for distributed-build-project", e );
View Full Code Here

    }

    public void cancelDistributedBuild( String buildAgentUrl, int projectGroupId, String scmRootAddress )
        throws ContinuumException
    {
        ThreadedDistributedBuildTaskQueueExecutor taskQueueExecutor = taskQueueExecutors.get( buildAgentUrl );

        if ( taskQueueExecutor != null )
        {
            if ( taskQueueExecutor.getCurrentTask() != null )
            {
                if ( taskQueueExecutor.getCurrentTask() instanceof PrepareBuildProjectsTask )
                {
                    PrepareBuildProjectsTask currentTask = (PrepareBuildProjectsTask) taskQueueExecutor.getCurrentTask();
                   
                    if ( currentTask.getProjectGroupId() == projectGroupId &&
                         currentTask.getScmRootAddress().equals( scmRootAddress ) )
                    {
                        log.info( "cancelling task for project group " + projectGroupId +
                                  " with scm root address " + scmRootAddress );
                        taskQueueExecutor.cancelTask( currentTask );

                        try
                        {
                            SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
                            client.cancelBuild();
View Full Code Here

    {
        Map<String, PrepareBuildProjectsTask> map = new HashMap<String, PrepareBuildProjectsTask>();

        for ( String url : taskQueueExecutors.keySet() )
        {
            ThreadedDistributedBuildTaskQueueExecutor taskQueueExecutor = taskQueueExecutors.get( url );

            if ( taskQueueExecutor.getCurrentTask() != null )
            {
                PrepareBuildProjectsTask task = (PrepareBuildProjectsTask) taskQueueExecutor.getCurrentTask();
               
                map.put( url, task );
            }
        }
View Full Code Here

    public void removeAgentFromTaskQueueExecutor( String buildAgentUrl )
        throws ContinuumException
    {
        log.info( "remove TaskQueueExecutor for build agent '" + buildAgentUrl + "'" );
        ThreadedDistributedBuildTaskQueueExecutor executor =
            (ThreadedDistributedBuildTaskQueueExecutor) taskQueueExecutors.get( buildAgentUrl );

        if ( executor == null )
        {
            return;
        }

        try
        {
            executor.stop();
            container.release( executor );
        }
        catch ( StoppingException e )
        {
            throw new ContinuumException( "Error while stopping task queue executor", e );
View Full Code Here

TOP

Related Classes of org.apache.continuum.builder.distributed.executor.ThreadedDistributedBuildTaskQueueExecutor$ExecutorRunnable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.