public class TaskChain<T> extends Object
TaskChainFactory
Modifier and Type | Method and Description |
---|---|
static void |
abort()
Call to abort execution of the chain.
|
TaskChain<?> |
abortChain()
Aborts the chain once this step is reached.
|
TaskChain<T> |
abortIf(Predicate<T> predicate)
Checks if the previous task return matches the supplied predicate, and aborts if it was.
|
TaskChain<T> |
abortIf(Predicate<T> predicate,
TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
abortIf(Predicate<T> predicate,
TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
abortIf(Predicate<T> predicate,
TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
abortIf(Predicate<T> predicate,
TaskChainAbortAction<A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)
Checks if the previous task return matches the supplied predicate, and aborts if it was.
|
TaskChain<T> |
abortIf(T ifObj)
Checks if the previous task return is the supplied value.
|
TaskChain<T> |
abortIf(T ifObj,
TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
abortIf(T ifObj,
TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
abortIf(T ifObj,
TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
abortIf(T ifObj,
TaskChainAbortAction<A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)
|
TaskChain<T> |
abortIfNot(Predicate<T> ifNotPredicate)
Checks if the previous task return does NOT match the supplied predicate, and aborts if it does not match.
|
TaskChain<T> |
abortIfNot(Predicate<T> ifNotPredicate,
TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
abortIfNot(Predicate<T> ifNotPredicate,
TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
abortIfNot(Predicate<T> ifNotPredicate,
TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
abortIfNot(Predicate<T> ifNotPredicate,
TaskChainAbortAction<A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)
Checks if the previous task return does NOT match the supplied predicate, and aborts if it does not match.
|
TaskChain<T> |
abortIfNot(T ifNotObj)
|
TaskChain<T> |
abortIfNot(T ifNotObj,
TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
abortIfNot(T ifNotObj,
TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
abortIfNot(T ifNotObj,
TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
abortIfNot(T ifNotObj,
TaskChainAbortAction<A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)
|
TaskChain<T> |
abortIfNull()
Checks if the previous task return was null.
|
TaskChain<T> |
abortIfNull(TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
abortIfNull(TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
abortIfNull(TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
abortIfNull(TaskChainAbortAction<A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)
Checks if the previous task return was null, and aborts if it was
Then executes supplied action handler
If not null, the previous task return will forward to the next task.
|
protected TaskChain |
add0(co.aikar.taskchain.TaskChain.TaskHolder<?,?> task) |
TaskChain<?> |
async(TaskChainTasks.GenericTask task)
TaskChain#sync(GenericTask) but ran off main thread |
<R> TaskChain<R> |
async(TaskChainTasks.Task<R,T> task)
TaskChain#sync(Task) but ran off main thread |
TaskChain<?> |
asyncCallback(TaskChainTasks.AsyncExecutingGenericTask task)
TaskChain#syncCallback(AsyncExecutingTask) but ran off main thread |
<R> TaskChain<R> |
asyncCallback(TaskChainTasks.AsyncExecutingTask<R,T> task)
TaskChain#syncCallback(AsyncExecutingTask) but ran off main thread |
<R> TaskChain<R> |
asyncFirst(TaskChainTasks.FirstTask<R> task)
TaskChain#syncFirst(FirstTask) but ran off main thread |
<R> TaskChain<R> |
asyncFirstCallback(TaskChainTasks.AsyncExecutingFirstTask<R> task)
TaskChain#syncFirstCallback(AsyncExecutingFirstTask) but ran off main thread |
<R> TaskChain<R> |
asyncFirstFuture(TaskChainTasks.FutureFirstTask<R> task)
TaskChain#syncFirstFuture(FutureFirstTask) but ran off main thread |
<R> TaskChain<List<R>> |
asyncFirstFutures(TaskChainTasks.FirstTask<List<CompletableFuture<R>>> task)
Executes a Task off the Main thread that provides a list of Futures, and holds processing
of the chain until all of the futures completes.
|
TaskChain<?> |
asyncFuture(TaskChainTasks.FutureGenericTask task)
TaskChain#syncFuture(FutureTask) but the future provider is ran off main thread |
<R> TaskChain<R> |
asyncFuture(TaskChainTasks.FutureTask<R,T> task)
TaskChain#syncFuture(FutureTask) but the future provider is ran off main thread |
<R> TaskChain<List<R>> |
asyncFutures(TaskChainTasks.Task<List<CompletableFuture<R>>,T> task)
Executes a Task off the Main thread that provides a list of Futures, and holds processing
of the chain until all of the futures completes.
|
TaskChain<?> |
asyncLast(TaskChainTasks.LastTask<T> task)
TaskChain#syncLast(LastTask) but ran off main thread |
TaskChain<T> |
configure(Consumer<TaskChain<T>> configure)
Allows you to call a callback to insert tasks into the chain without having to break the fluent interface
Example: Plugin.newChain().sync(some::task).configure(chain -> {
chain.async(some::foo);
chain.sync(other::bar);
}).async(other::task).execute();
|
TaskChain<?> |
current(TaskChainTasks.GenericTask task)
TaskChain#sync(GenericTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
current(TaskChainTasks.Task<R,T> task)
TaskChain#sync(Task) but ran on current thread the Chain was created on |
TaskChain<?> |
currentCallback(TaskChainTasks.AsyncExecutingGenericTask task)
TaskChain#syncCallback(AsyncExecutingTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
currentCallback(TaskChainTasks.AsyncExecutingTask<R,T> task)
TaskChain#syncCallback(AsyncExecutingTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
currentFirst(TaskChainTasks.FirstTask<R> task)
TaskChain#syncFirst(FirstTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
currentFirstCallback(TaskChainTasks.AsyncExecutingFirstTask<R> task)
TaskChain#syncFirstCallback(AsyncExecutingFirstTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
currentFirstFuture(TaskChainTasks.FutureFirstTask<R> task)
TaskChain#syncFirstFuture(FutureFirstTask) but ran on current thread the Chain was created on |
<R> TaskChain<List<R>> |
currentFirstFutures(TaskChainTasks.FirstTask<List<CompletableFuture<R>>> task)
Executes a Task on the current thread that provides a list of Futures, and holds processing
of the chain until all of the futures completes.
|
TaskChain<?> |
currentFuture(TaskChainTasks.FutureGenericTask task)
TaskChain#syncFuture(FutureTask) but the future provider is ran on current thread the Chain was created on |
<R> TaskChain<R> |
currentFuture(TaskChainTasks.FutureTask<R,T> task)
TaskChain#syncFuture(FutureTask) but the future provider is ran on current thread the Chain was created on |
<R> TaskChain<List<R>> |
currentFutures(TaskChainTasks.Task<List<CompletableFuture<R>>,T> task)
Executes a Task on the current thread that provides a list of Futures, and holds processing
of the chain until all of the futures completes.
|
TaskChain<?> |
currentLast(TaskChainTasks.LastTask<T> task)
TaskChain#syncLast(LastTask) but ran on current thread the Chain was created on |
TaskChain<T> |
delay(int gameUnits)
IMPLEMENTATION SPECIFIC!!
Consult your application implementation to understand how long 1 unit is.
|
TaskChain<T> |
delay(int duration,
TimeUnit unit)
Adds a real time delay to the chain execution.
|
void |
execute()
Finished adding tasks, begins executing them.
|
void |
execute(BiConsumer<Exception,TaskChainTasks.Task<?,?>> errorHandler)
Finished adding tasks, begins executing them, with an error handler
|
void |
execute(Consumer<Boolean> done)
Finished adding tasks, with a done notifier
|
void |
execute(Consumer<Boolean> done,
BiConsumer<Exception,TaskChainTasks.Task<?,?>> errorHandler)
Finished adding tasks, begins executing them with a done notifier and error handler
|
void |
execute(Runnable done)
Finished adding tasks, begins executing them with a done notifier
|
void |
execute(Runnable done,
BiConsumer<Exception,TaskChainTasks.Task<?,?>> errorHandler)
Finished adding tasks, begins executing them with a done notifier and error handler
|
<R> TaskChain<R> |
future(CompletableFuture<R> future)
Takes a supplied Future, and holds processing of the chain until the future completes.
|
<R> TaskChain<List<R>> |
futures(CompletableFuture<R>... futures)
Takes multiple supplied Futures, and holds processing of the chain until the futures completes.
|
<R> TaskChain<List<R>> |
futures(List<CompletableFuture<R>> futures)
Takes multiple supplied Futures, and holds processing of the chain until the futures completes.
|
int |
getCurrentActionIndex()
Called in an executing task, get the current action index.
|
static TaskChain<?> |
getCurrentChain()
Usable only inside of an executing Task or Chain Error/Done handlers
Gets the current chain that is executing this Task or Error/Done handler
This method should only be called on the same thread that is executing the method.
|
BiConsumer<Exception,TaskChainTasks.Task<?,?>> |
getErrorHandler() |
<R> R |
getTaskData(String key)
Retrieves a value relating to a specific key, saved by a previous task.
|
boolean |
hasTaskData(String key)
Checks if the chain has a value saved for the specified key.
|
static <D1,D2> TaskChainDataWrappers.Data2<D1,D2> |
multi(D1 var1,
D2 var2)
Creates a data wrapper to return multiple objects from a task
|
static <D1,D2,D3> TaskChainDataWrappers.Data3<D1,D2,D3> |
multi(D1 var1,
D2 var2,
D3 var3)
Creates a data wrapper to return multiple objects from a task
|
static <D1,D2,D3,D4> |
multi(D1 var1,
D2 var2,
D3 var3,
D4 var4)
Creates a data wrapper to return multiple objects from a task
|
static <D1,D2,D3,D4,D5> |
multi(D1 var1,
D2 var2,
D3 var3,
D4 var4,
D5 var5)
Creates a data wrapper to return multiple objects from a task
|
static <D1,D2,D3,D4,D5,D6> |
multi(D1 var1,
D2 var2,
D3 var3,
D4 var4,
D5 var5,
D6 var6)
Creates a data wrapper to return multiple objects from a task
|
<R> R |
removeTaskData(String key)
Removes a saved value on the chain.
|
TaskChain<TaskChain<?>> |
returnChain()
Returns the chain itself to the next task.
|
<R> TaskChain<R> |
returnData(String key)
Reads the specified key from Task Data, and passes it to the next task.
|
void |
setDoneCallback(Consumer<Boolean> doneCallback)
Changes the done callback handler for this chain
|
void |
setErrorHandler(BiConsumer<Exception,TaskChainTasks.Task<?,?>> errorHandler)
Changes the error handler for this chain
|
<R> R |
setTaskData(String key,
Object val)
Saves a value for this chain so that a task furthur up the chain can access it.
|
TaskChain<T> |
storeAsData(String key)
Takes the previous tasks return value, stores it to the specified key
as Task Data, and then forwards that value to the next task.
|
TaskChain<?> |
sync(TaskChainTasks.GenericTask task)
Execute task on main thread, with no input or output
|
<R> TaskChain<R> |
sync(TaskChainTasks.Task<R,T> task)
Execute task on main thread, with the last returned input, returning an output
|
TaskChain<?> |
syncCallback(TaskChainTasks.AsyncExecutingGenericTask task)
TaskChain#syncCallback(AsyncExecutingTask) , ran on main thread but no input or output |
<R> TaskChain<R> |
syncCallback(TaskChainTasks.AsyncExecutingTask<R,T> task)
Execute a task on the main thread, with the last output, and a callback to return the response to.
|
<R> TaskChain<R> |
syncFirst(TaskChainTasks.FirstTask<R> task)
Execute task on main thread, with no input, returning an output
|
<R> TaskChain<R> |
syncFirstCallback(TaskChainTasks.AsyncExecutingFirstTask<R> task)
Execute a task on the main thread, with no previous input, and a callback to return the response to.
|
<R> TaskChain<R> |
syncFirstFuture(TaskChainTasks.FutureFirstTask<R> task)
Execute a task on the main thread, with no previous input, that will return a Future to signal completion
It's important you don't perform blocking operations in this method.
|
<R> TaskChain<List<R>> |
syncFirstFutures(TaskChainTasks.FirstTask<List<CompletableFuture<R>>> task)
Executes a Task on the Main thread that provides a list of Futures, and holds processing
of the chain until all of the futures completes.
|
TaskChain<?> |
syncFuture(TaskChainTasks.FutureGenericTask task)
TaskChain#syncFuture(FutureTask) , ran on main thread but no input or output |
<R> TaskChain<R> |
syncFuture(TaskChainTasks.FutureTask<R,T> task)
Execute a task on the main thread, with the last output as the input to the future provider,
that will return a Future to signal completion.
|
<R> TaskChain<List<R>> |
syncFutures(TaskChainTasks.Task<List<CompletableFuture<R>>,T> task)
Executes a Task on the Main thread that provides a list of Futures, and holds processing
of the chain until all of the futures completes.
|
TaskChain<?> |
syncLast(TaskChainTasks.LastTask<T> task)
Execute task on main thread, with the last output, and no furthur output
|
public int getCurrentActionIndex()
public void setDoneCallback(Consumer<Boolean> doneCallback)
doneCallback
- The handlerpublic BiConsumer<Exception,TaskChainTasks.Task<?,?>> getErrorHandler()
public void setErrorHandler(BiConsumer<Exception,TaskChainTasks.Task<?,?>> errorHandler)
errorHandler
- The error handlerpublic static <D1,D2> TaskChainDataWrappers.Data2<D1,D2> multi(D1 var1, D2 var2)
public static <D1,D2,D3> TaskChainDataWrappers.Data3<D1,D2,D3> multi(D1 var1, D2 var2, D3 var3)
public static <D1,D2,D3,D4> TaskChainDataWrappers.Data4<D1,D2,D3,D4> multi(D1 var1, D2 var2, D3 var3, D4 var4)
public static <D1,D2,D3,D4,D5> TaskChainDataWrappers.Data5<D1,D2,D3,D4,D5> multi(D1 var1, D2 var2, D3 var3, D4 var4, D5 var5)
public static <D1,D2,D3,D4,D5,D6> TaskChainDataWrappers.Data6<D1,D2,D3,D4,D5,D6> multi(D1 var1, D2 var2, D3 var3, D4 var4, D5 var5, D6 var6)
public static void abort()
public static TaskChain<?> getCurrentChain()
public TaskChain<T> configure(Consumer<TaskChain<T>> configure)
configure
- Instance of the current chain.public boolean hasTaskData(String key)
key
- Key to check if Task Data has a value forpublic <R> R getTaskData(String key)
R
- Type the Task Data value is expected to bekey
- Key to look up Task Data forpublic <R> R setTaskData(String key, Object val)
R
- Type the Task Data value is expected to bekey
- Key to store in Task Dataval
- Value to store in Task Datapublic <R> R removeTaskData(String key)
R
- Type the Task Data value is expected to bekey
- Key to remove from Task Datapublic TaskChain<T> storeAsData(String key)
key
- Key to store the previous return value into Task Datapublic <R> TaskChain<R> returnData(String key)
R
- Return type that the next parameter can expect as argument typekey
- Key to retrieve from Task Data and pass to next taskpublic TaskChain<TaskChain<?>> returnChain()
public TaskChain<T> delay(int gameUnits)
gameUnits
- # of game units to delay before next taskpublic TaskChain<T> delay(int duration, TimeUnit unit)
duration
- duration of the delay before next taskpublic TaskChain<?> abortChain()
public TaskChain<T> abortIfNull()
public TaskChain<T> abortIfNull(TaskChainAbortAction<?,?,?> action)
public <A1> TaskChain<T> abortIfNull(TaskChainAbortAction<A1,?,?> action, A1 arg1)
public <A1,A2> TaskChain<T> abortIfNull(TaskChainAbortAction<A1,A2,?> action, A1 arg1, A2 arg2)
public <A1,A2,A3> TaskChain<T> abortIfNull(TaskChainAbortAction<A1,A2,A3> action, A1 arg1, A2 arg2, A3 arg3)
public TaskChain<T> abortIf(T ifObj)
public TaskChain<T> abortIf(T ifObj, TaskChainAbortAction<?,?,?> action)
public <A1> TaskChain<T> abortIf(T ifObj, TaskChainAbortAction<A1,?,?> action, A1 arg1)
public <A1,A2> TaskChain<T> abortIf(T ifObj, TaskChainAbortAction<A1,A2,?> action, A1 arg1, A2 arg2)
public <A1,A2,A3> TaskChain<T> abortIf(T ifObj, TaskChainAbortAction<A1,A2,A3> action, A1 arg1, A2 arg2, A3 arg3)
public TaskChain<T> abortIf(Predicate<T> predicate)
public <A1> TaskChain<T> abortIf(Predicate<T> predicate, TaskChainAbortAction<A1,?,?> action, A1 arg1)
public <A1,A2> TaskChain<T> abortIf(Predicate<T> predicate, TaskChainAbortAction<A1,A2,?> action, A1 arg1, A2 arg2)
public <A1,A2,A3> TaskChain<T> abortIf(Predicate<T> predicate, TaskChainAbortAction<A1,A2,A3> action, A1 arg1, A2 arg2, A3 arg3)
public TaskChain<T> abortIfNot(T ifNotObj)
public TaskChain<T> abortIfNot(T ifNotObj, TaskChainAbortAction<?,?,?> action)
public <A1> TaskChain<T> abortIfNot(T ifNotObj, TaskChainAbortAction<A1,?,?> action, A1 arg1)
public <A1,A2> TaskChain<T> abortIfNot(T ifNotObj, TaskChainAbortAction<A1,A2,?> action, A1 arg1, A2 arg2)
public <A1,A2,A3> TaskChain<T> abortIfNot(T ifNotObj, TaskChainAbortAction<A1,A2,A3> action, A1 arg1, A2 arg2, A3 arg3)
public TaskChain<T> abortIfNot(Predicate<T> ifNotPredicate)
public TaskChain<T> abortIfNot(Predicate<T> ifNotPredicate, TaskChainAbortAction<?,?,?> action)
public <A1> TaskChain<T> abortIfNot(Predicate<T> ifNotPredicate, TaskChainAbortAction<A1,?,?> action, A1 arg1)
public <A1,A2> TaskChain<T> abortIfNot(Predicate<T> ifNotPredicate, TaskChainAbortAction<A1,A2,?> action, A1 arg1, A2 arg2)
public <A1,A2,A3> TaskChain<T> abortIfNot(Predicate<T> ifNotPredicate, TaskChainAbortAction<A1,A2,A3> action, A1 arg1, A2 arg2, A3 arg3)
public <R> TaskChain<R> syncFirstCallback(TaskChainTasks.AsyncExecutingFirstTask<R> task)
R
- Return type that the next parameter can expect as argument typetask
- The task to executepublic <R> TaskChain<R> asyncFirstCallback(TaskChainTasks.AsyncExecutingFirstTask<R> task)
TaskChain#syncFirstCallback(AsyncExecutingFirstTask)
but ran off main threadR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic <R> TaskChain<R> currentFirstCallback(TaskChainTasks.AsyncExecutingFirstTask<R> task)
TaskChain#syncFirstCallback(AsyncExecutingFirstTask)
but ran on current thread the Chain was created onR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic <R> TaskChain<R> syncCallback(TaskChainTasks.AsyncExecutingTask<R,T> task)
R
- Return type that the next parameter can expect as argument typetask
- The task to executepublic TaskChain<?> syncCallback(TaskChainTasks.AsyncExecutingGenericTask task)
TaskChain#syncCallback(AsyncExecutingTask)
, ran on main thread but no input or outputtask
- The task to executepublic <R> TaskChain<R> asyncCallback(TaskChainTasks.AsyncExecutingTask<R,T> task)
TaskChain#syncCallback(AsyncExecutingTask)
but ran off main threadR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic TaskChain<?> asyncCallback(TaskChainTasks.AsyncExecutingGenericTask task)
TaskChain#syncCallback(AsyncExecutingTask)
but ran off main threadtask
- The task to executepublic <R> TaskChain<R> currentCallback(TaskChainTasks.AsyncExecutingTask<R,T> task)
TaskChain#syncCallback(AsyncExecutingTask)
but ran on current thread the Chain was created onR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic TaskChain<?> currentCallback(TaskChainTasks.AsyncExecutingGenericTask task)
TaskChain#syncCallback(AsyncExecutingTask)
but ran on current thread the Chain was created ontask
- The task to executepublic <R> TaskChain<R> future(CompletableFuture<R> future)
R
- Return type that the next parameter can expect as argument typefuture
- The Future to wait until it is complete on@SafeVarargs public final <R> TaskChain<List<R>> futures(CompletableFuture<R>... futures)
R
- Return type that the next parameter can expect as argument typefutures
- The Futures to wait until it is complete onpublic <R> TaskChain<List<R>> futures(List<CompletableFuture<R>> futures)
R
- Return type that the next parameter can expect as argument typefutures
- The Futures to wait until it is complete onpublic <R> TaskChain<List<R>> syncFutures(TaskChainTasks.Task<List<CompletableFuture<R>>,T> task)
R
- Return type that the next parameter can expect as argument typetask
- The Futures Provider Taskpublic <R> TaskChain<List<R>> asyncFutures(TaskChainTasks.Task<List<CompletableFuture<R>>,T> task)
R
- Return type that the next parameter can expect as argument typetask
- The Futures Provider Taskpublic <R> TaskChain<List<R>> currentFutures(TaskChainTasks.Task<List<CompletableFuture<R>>,T> task)
R
- Return type that the next parameter can expect as argument typetask
- The Futures Provider Taskpublic <R> TaskChain<List<R>> syncFirstFutures(TaskChainTasks.FirstTask<List<CompletableFuture<R>>> task)
R
- Return type that the next parameter can expect as argument typetask
- The Futures Provider Taskpublic <R> TaskChain<List<R>> asyncFirstFutures(TaskChainTasks.FirstTask<List<CompletableFuture<R>>> task)
R
- Return type that the next parameter can expect as argument typetask
- The Futures Provider Taskpublic <R> TaskChain<List<R>> currentFirstFutures(TaskChainTasks.FirstTask<List<CompletableFuture<R>>> task)
R
- Return type that the next parameter can expect as argument typetask
- The Futures Provider Taskpublic <R> TaskChain<R> syncFirstFuture(TaskChainTasks.FutureFirstTask<R> task)
R
- Return type that the next parameter can expect as argument typetask
- The task to executepublic <R> TaskChain<R> asyncFirstFuture(TaskChainTasks.FutureFirstTask<R> task)
TaskChain#syncFirstFuture(FutureFirstTask)
but ran off main threadR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic <R> TaskChain<R> currentFirstFuture(TaskChainTasks.FutureFirstTask<R> task)
TaskChain#syncFirstFuture(FutureFirstTask)
but ran on current thread the Chain was created onR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic <R> TaskChain<R> syncFuture(TaskChainTasks.FutureTask<R,T> task)
R
- Return type that the next parameter can expect as argument typetask
- The task to executepublic TaskChain<?> syncFuture(TaskChainTasks.FutureGenericTask task)
TaskChain#syncFuture(FutureTask)
, ran on main thread but no input or outputtask
- The task to executepublic <R> TaskChain<R> asyncFuture(TaskChainTasks.FutureTask<R,T> task)
TaskChain#syncFuture(FutureTask)
but the future provider is ran off main threadR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic TaskChain<?> asyncFuture(TaskChainTasks.FutureGenericTask task)
TaskChain#syncFuture(FutureTask)
but the future provider is ran off main threadtask
- The task to executepublic <R> TaskChain<R> currentFuture(TaskChainTasks.FutureTask<R,T> task)
TaskChain#syncFuture(FutureTask)
but the future provider is ran on current thread the Chain was created onR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic TaskChain<?> currentFuture(TaskChainTasks.FutureGenericTask task)
TaskChain#syncFuture(FutureTask)
but the future provider is ran on current thread the Chain was created ontask
- The task to executepublic <R> TaskChain<R> syncFirst(TaskChainTasks.FirstTask<R> task)
R
- Return type that the next parameter can expect as argument typetask
- The task to executepublic <R> TaskChain<R> asyncFirst(TaskChainTasks.FirstTask<R> task)
TaskChain#syncFirst(FirstTask)
but ran off main threadR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic <R> TaskChain<R> currentFirst(TaskChainTasks.FirstTask<R> task)
TaskChain#syncFirst(FirstTask)
but ran on current thread the Chain was created onR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic <R> TaskChain<R> sync(TaskChainTasks.Task<R,T> task)
R
- Return type that the next parameter can expect as argument typetask
- The task to executepublic TaskChain<?> sync(TaskChainTasks.GenericTask task)
task
- The task to executepublic <R> TaskChain<R> async(TaskChainTasks.Task<R,T> task)
TaskChain#sync(Task)
but ran off main threadR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic TaskChain<?> async(TaskChainTasks.GenericTask task)
TaskChain#sync(GenericTask)
but ran off main threadtask
- The task to executepublic <R> TaskChain<R> current(TaskChainTasks.Task<R,T> task)
TaskChain#sync(Task)
but ran on current thread the Chain was created onR
- Return type that the next parameter can expect as argument typetask
- The task to executepublic TaskChain<?> current(TaskChainTasks.GenericTask task)
TaskChain#sync(GenericTask)
but ran on current thread the Chain was created ontask
- The task to executepublic TaskChain<?> syncLast(TaskChainTasks.LastTask<T> task)
task
- The task to executepublic TaskChain<?> asyncLast(TaskChainTasks.LastTask<T> task)
TaskChain#syncLast(LastTask)
but ran off main threadtask
- The task to executepublic TaskChain<?> currentLast(TaskChainTasks.LastTask<T> task)
TaskChain#syncLast(LastTask)
but ran on current thread the Chain was created ontask
- The task to executepublic void execute()
public void execute(Runnable done)
done
- The Callback to handle when the chain has finished completion. Argument to consumer contains finish statepublic void execute(Runnable done, BiConsumer<Exception,TaskChainTasks.Task<?,?>> errorHandler)
done
- The Callback to handle when the chain has finished completion. Argument to consumer contains finish stateerrorHandler
- The Error handler to handle exceptionspublic void execute(Consumer<Boolean> done)
done
- The Callback to handle when the chain has finished completion. Argument to consumer contains finish statepublic void execute(BiConsumer<Exception,TaskChainTasks.Task<?,?>> errorHandler)
errorHandler
- The Error handler to handle exceptionspublic void execute(Consumer<Boolean> done, BiConsumer<Exception,TaskChainTasks.Task<?,?>> errorHandler)
done
- The Callback to handle when the chain has finished completion. Argument to consumer contains finish stateerrorHandler
- The Error handler to handle exceptionsCopyright © 2018. All rights reserved.