public final class WorkUnitContext extends Object
WorkUnit
s created from the same Queue.Task
.Modifier and Type | Field and 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 and Description |
---|
WorkUnitContext(Queue.BuildableItem item) |
Modifier and Type | Method and 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(Queue.Executable executable,
Throwable problems,
long duration)
All the
Executor s that jointly execute a Queue.Task call this method to synchronize on the end of the task. |
void |
synchronizeStart()
All the
Executor s that jointly execute a Queue.Task call this method to synchronize on the start. |
public final Queue.BuildableItem item
public final Queue.Task task
public final FutureImpl future
public WorkUnitContext(Queue.BuildableItem item)
public WorkUnit getPrimaryWorkUnit()
public void synchronizeStart() throws InterruptedException
Executor
s that jointly execute a Queue.Task
call this method to synchronize on the start.InterruptedException
public void synchronizeEnd(Queue.Executable executable, Throwable problems, long duration) throws InterruptedException
Executor
s that jointly execute a Queue.Task
call this method to synchronize on the end of the task.InterruptedException
- If any of the member thread is interrupted while waiting for other threads to join, all
the member threads will report InterruptedException
.public void abort(Throwable cause)
Copyright © 2014. All rights reserved.