Package hudson.model.queue

Examples of hudson.model.queue.SubTask


                // sometime an interrupt aborts a build but without clearing the flag.
                // see issue #1583
                if (Thread.interrupted())   continue;
                if (induceDeath)        throw new ThreadDeath();

                SubTask task;
                try {
                    // transition from idle to building.
                    // perform this state change as an atomic operation wrt other queue operations
                    synchronized (queue) {
                        workUnit = grabJob();
                        workUnit.setExecutor(this);
                        if (LOGGER.isLoggable(FINE))
                            LOGGER.log(FINE, getName()+" grabbed "+workUnit+" from queue");
                        task = workUnit.work;
                        startTime = System.currentTimeMillis();
                        executable = task.createExecutable();
                    }
                    if (LOGGER.isLoggable(FINE))
                        LOGGER.log(FINE, getName()+" is going to execute "+executable);
                } catch (IOException e) {
                    LOGGER.log(Level.SEVERE, "Executor threw an exception", e);
View Full Code Here


        }
        Queue.Executable exec = executor.getCurrentExecutable();
        if (exec == null) {
            throw new IllegalArgumentException("cannot save an Executor that is not running anything");
        }
        SubTask parent = exec.getParent();
        this.task = parent instanceof Queue.Task ? (Queue.Task) parent : parent.getOwnerTask();
        if (task instanceof Queue.TransientTask) {
            throw new IllegalArgumentException("cannot save a TransientTask");
        }
    }
View Full Code Here

                // sometime an interrupt aborts a build but without clearing the flag.
                // see issue #1583
                if (Thread.interrupted())   continue;
                if (induceDeath)        throw new ThreadDeath();

                SubTask task;
                try {
                    // transition from idle to building.
                    // perform this state change as an atomic operation wrt other queue operations
                    synchronized (queue) {
                        workUnit = grabJob();
                        workUnit.setExecutor(this);
                        task = workUnit.work;
                        startTime = System.currentTimeMillis();
                        executable = task.createExecutable();
                    }
                } catch (IOException e) {
                    LOGGER.log(Level.SEVERE, "Executor threw an exception", e);
                    continue;
                } catch (InterruptedException e) {
View Full Code Here

TOP

Related Classes of hudson.model.queue.SubTask

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.