public class TaskBuilder<T>
extends java.lang.Object
Constructor and Description |
---|
TaskBuilder() |
Modifier and Type | Method and Description |
---|---|
TaskBuilder<T> |
add(TaskAdaptable<?>... additionalChildren) |
TaskBuilder<T> |
add(TaskAdaptable<?> child)
adds a child to the given task; the semantics of how the child is executed is set using
dynamic(boolean) and parallel(boolean) |
TaskBuilder<T> |
addAll(java.lang.Iterable<? extends TaskAdaptable<?>> additionalChildren) |
TaskBuilder<T> |
body(java.util.concurrent.Callable<T> body) |
TaskBuilder<T> |
body(java.lang.Runnable body) |
Task<T> |
build() |
static <T> TaskBuilder<T> |
builder() |
TaskFactory<Task<T>> |
buildFactory()
returns a a factory based on this builder
|
TaskBuilder<T> |
description(java.lang.String description) |
TaskBuilder<T> |
dynamic(boolean dynamic)
whether task that is built has been explicitly specified to be a dynamic task
(ie a Task which is also a
TaskQueueingContext
whereby new tasks can be added after creation |
TaskBuilder<T> |
flag(java.lang.String flag,
java.lang.Object value)
adds a flag to the given task
|
TaskBuilder<T> |
flags(java.util.Map<java.lang.String,java.lang.Object> flags)
adds the given flags to the given task
|
TaskBuilder<T> |
name(java.lang.String name) |
TaskBuilder<T> |
parallel(boolean parallel)
whether task that is built should be parallel; cannot (currently) also be dynamic
|
TaskBuilder<T> |
swallowChildrenFailures(boolean swallowChildrenFailures)
sets up a dynamic task not to fail even if children fail
|
TaskBuilder<T> |
tag(java.lang.Object tag)
adds a tag to the given task
|
java.lang.String |
toString() |
public static <T> TaskBuilder<T> builder()
public TaskBuilder<T> name(java.lang.String name)
public TaskBuilder<T> description(java.lang.String description)
public TaskBuilder<T> dynamic(boolean dynamic)
TaskQueueingContext
whereby new tasks can be added after creationpublic TaskBuilder<T> parallel(boolean parallel)
public TaskBuilder<T> body(java.util.concurrent.Callable<T> body)
public TaskBuilder<T> swallowChildrenFailures(boolean swallowChildrenFailures)
public TaskBuilder<T> body(java.lang.Runnable body)
public TaskBuilder<T> add(TaskAdaptable<?> child)
dynamic(boolean)
and parallel(boolean)
public TaskBuilder<T> addAll(java.lang.Iterable<? extends TaskAdaptable<?>> additionalChildren)
public TaskBuilder<T> add(TaskAdaptable<?>... additionalChildren)
public TaskBuilder<T> tag(java.lang.Object tag)
public TaskBuilder<T> flag(java.lang.String flag, java.lang.Object value)
public TaskBuilder<T> flags(java.util.Map<java.lang.String,java.lang.Object> flags)
public TaskFactory<Task<T>> buildFactory()
public java.lang.String toString()
toString
in class java.lang.Object