Package hudson.model.queue
Class WorkUnitContext
- java.lang.Object
-
- hudson.model.queue.WorkUnitContext
-
public final class WorkUnitContext extends Object
Holds the information shared betweenWorkUnits created from the sameQueue.Task.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description List<Action>actionsAssociated parameters to the build.FutureImplfutureOnce the execution starts and completes, update this future object with the outcome.Queue.BuildableItemitemQueue.Tasktask
-
Constructor Summary
Constructors Constructor Description WorkUnitContext(Queue.BuildableItem item)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidabort(Throwable cause)When one of the work unit is aborted, call this method to abort all the other work units.WorkUnitcreateWorkUnit(SubTask execUnit)WorkUnitgetPrimaryWorkUnit()List<WorkUnit>getWorkUnits()voidsynchronizeEnd(Executor e, Queue.Executable executable, Throwable problems, long duration)All theExecutors that jointly execute aQueue.Taskcall this method to synchronize on the end of the task.voidsynchronizeEnd(Queue.Executable executable, Throwable problems, long duration)Deprecated.voidsynchronizeStart()All theExecutors that jointly execute aQueue.Taskcall this method to synchronize on the start.
-
-
-
Field Detail
-
item
public final Queue.BuildableItem item
-
task
public final Queue.Task task
-
future
public final FutureImpl future
Once the execution starts and completes, update this future object with the outcome.
-
-
Constructor Detail
-
WorkUnitContext
public WorkUnitContext(Queue.BuildableItem item)
-
-
Method Detail
-
getPrimaryWorkUnit
public WorkUnit getPrimaryWorkUnit()
-
synchronizeStart
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void synchronizeStart() throws InterruptedExceptionAll theExecutors that jointly execute aQueue.Taskcall this method to synchronize on the start.- Throws:
InterruptedException
-
synchronizeEnd
@Deprecated public void synchronizeEnd(Queue.Executable executable, Throwable problems, long duration) throws InterruptedException
Deprecated.- Throws:
InterruptedException
-
synchronizeEnd
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void synchronizeEnd(Executor e, Queue.Executable executable, Throwable problems, long duration) throws InterruptedException
All theExecutors that jointly execute aQueue.Taskcall this method to synchronize on the end of the task.- Throws:
InterruptedException- If any of the member thread is interrupted while waiting for other threads to join, all the member threads will reportInterruptedException.
-
abort
public void abort(Throwable cause)
When one of the work unit is aborted, call this method to abort all the other work units.
-
-