Package hudson.model.queue
Class WorkUnitContext
- java.lang.Object
-
- hudson.model.queue.WorkUnitContext
-
public final class WorkUnitContext extends Object
Holds the information shared betweenWorkUnit
s created from the sameQueue.Task
.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description List<Action>
actions
Associated parameters to the build.FutureImpl
future
Once the execution starts and completes, update this future object with the outcome.Queue.BuildableItem
item
Queue.Task
task
-
Constructor Summary
Constructors Constructor Description WorkUnitContext(Queue.BuildableItem item)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
abort(Throwable cause)
When one of the work unit is aborted, call this method to abort all the other work units.WorkUnit
createWorkUnit(SubTask execUnit)
WorkUnit
getPrimaryWorkUnit()
List<WorkUnit>
getWorkUnits()
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
synchronizeStart()
All theExecutor
s that jointly execute aQueue.Task
call 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 InterruptedException
All 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
public void abort(Throwable cause)
When one of the work unit is aborted, call this method to abort all the other work units.
-
-