Package hudson.model.queue
Class WorkUnitContext
java.lang.Object
hudson.model.queue.WorkUnitContext
Holds the information shared between
WorkUnit
s created from the same Queue.Task
.- Author:
- Kohsuke Kawaguchi
-
Field Summary
Modifier and TypeFieldDescriptionAssociated parameters to the build.final FutureImpl
Once the execution starts and completes, update this future object with the outcome.final Queue.BuildableItem
final Queue.Task
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
When one of the work unit is aborted, call this method to abort all the other work units.createWorkUnit
(SubTask execUnit) void
synchronizeEnd
(Executor e, Queue.Executable executable, Throwable problems, long duration) All theExecutor
s that jointly execute aQueue.Task
call this method to synchronize on the end of the task.void
synchronizeEnd
(Queue.Executable executable, Throwable problems, long duration) Deprecated.void
All theExecutor
s that jointly execute aQueue.Task
call 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 theExecutor
s that jointly execute aQueue.Task
call 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 theExecutor
s that jointly execute aQueue.Task
call 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.
-