hudson.model.queue
Class WorkUnit

java.lang.Object
  extended by hudson.model.queue.WorkUnit

@ExportedBean
public final class WorkUnit
extends Object

Represents a unit of hand-over to Executor from Queue.

Since:
1.377
Author:
Kohsuke Kawaguchi

Field Summary
 WorkUnitContext context
          Shared context among WorkUnits.
 SubTask work
          Task to be executed.
 
Method Summary
 Queue.Executable getExecutable()
          If the execution has already started, return the current executable.
 Executor getExecutor()
          Executor running this work unit.
 boolean isMainWork()
          Is this work unit the "main work", which is the primary SubTask represented by Queue.Task itself.
 void setExecutor(Executor e)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

work

public final SubTask work
Task to be executed.


context

public final WorkUnitContext context
Shared context among WorkUnits.

Method Detail

getExecutor

public Executor getExecutor()
Executor running this work unit.

Executor.getCurrentWorkUnit() and getExecutor() form a bi-directional reachability between them.


setExecutor

public void setExecutor(Executor e)

getExecutable

public Queue.Executable getExecutable()
If the execution has already started, return the current executable.


isMainWork

public boolean isMainWork()
Is this work unit the "main work", which is the primary SubTask represented by Queue.Task itself.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2013. All Rights Reserved.