hudson.model
Class OneOffExecutor

java.lang.Object
  extended by java.lang.Thread
      extended by hudson.model.Executor
          extended by hudson.model.OneOffExecutor
All Implemented Interfaces:
ModelObject, Runnable

public class OneOffExecutor
extends Executor

Executor that's temporarily added to carry out tasks that doesn't consume regular executors, like a matrix project parent build.

Author:
Kohsuke Kawaguchi
See Also:
Queue.FlyweightTask

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class hudson.model.Executor
owner
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
OneOffExecutor(Computer owner, WorkUnit work)
           
 
Method Summary
 WorkUnit getAssignedWorkUnit()
           
protected  WorkUnit grabJob()
           
 void run()
           
protected  boolean shouldRun()
          Returns true if we should keep going.
 
Methods inherited from class hudson.model.Executor
abortResult, currentExecutor, doStop, doStop, doYank, getApi, getCauseOfDeath, getCurrentExecutable, getCurrentWorkspace, getCurrentWorkUnit, getDisplayName, getElapsedTime, getEstimatedDurationFor, getEstimatedRemainingTime, getEstimatedRemainingTimeMillis, getIdleStartMilliseconds, getNumber, getOwner, getProgress, getTimeSpentInQueue, getTimestampString, hasStopPermission, interrupt, interrupt, interrupt, isBusy, isIdle, isLikelyStuck, killHard, newImpersonatingProxy, recordCauseOfInterruption
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OneOffExecutor

public OneOffExecutor(Computer owner,
                      WorkUnit work)
Method Detail

shouldRun

protected boolean shouldRun()
Description copied from class: Executor
Returns true if we should keep going.

Overrides:
shouldRun in class Executor

getAssignedWorkUnit

public WorkUnit getAssignedWorkUnit()

grabJob

protected WorkUnit grabJob()
                    throws InterruptedException
Overrides:
grabJob in class Executor
Throws:
InterruptedException

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Executor


Copyright © 2004-2013. All Rights Reserved.