Package hudson.model.queue
Class WorkUnitContext
java.lang.Object
hudson.model.queue.WorkUnitContext
Holds the information shared between
WorkUnits created from the same Queue.Task.- Author:
- Kohsuke Kawaguchi
-
Field Summary
FieldsModifier and TypeFieldDescriptionAssociated parameters to the build.final FutureImplOnce the execution starts and completes, update this future object with the outcome.final Queue.BuildableItemfinal Queue.Task -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidWhen one of the work unit is aborted, call this method to abort all the other work units.createWorkUnit(SubTask execUnit) 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.voidAll theExecutors that jointly execute aQueue.Taskcall this method to synchronize on the start.
-
Field Details
-
item
-
task
-
future
Once the execution starts and completes, update this future object with the outcome. -
actions
Associated parameters to the build.
-
-
Constructor Details
-
WorkUnitContext
-
-
Method Details
-
createWorkUnit
-
getWorkUnits
-
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
When one of the work unit is aborted, call this method to abort all the other work units.
-