Modifier and Type | Method and Description |
---|---|
TaskChain<?> |
TaskChain.abortChain()
Aborts the chain once this step is reached.
|
TaskChain<T> |
TaskChain.abortIf(Predicate<T> predicate)
Checks if the previous task return matches the supplied predicate, and aborts if it was.
|
TaskChain<T> |
TaskChain.abortIf(Predicate<T> predicate,
TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
TaskChain.abortIf(Predicate<T> predicate,
TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
TaskChain.abortIf(Predicate<T> predicate,
TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
TaskChain.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> |
TaskChain.abortIf(T ifObj)
Checks if the previous task return is the supplied value.
|
TaskChain<T> |
TaskChain.abortIf(T ifObj,
TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
TaskChain.abortIf(T ifObj,
TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
TaskChain.abortIf(T ifObj,
TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
TaskChain.abortIf(T ifObj,
TaskChainAbortAction<A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)
|
TaskChain<T> |
TaskChain.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> |
TaskChain.abortIfNot(Predicate<T> ifNotPredicate,
TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
TaskChain.abortIfNot(Predicate<T> ifNotPredicate,
TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
TaskChain.abortIfNot(Predicate<T> ifNotPredicate,
TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
TaskChain.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> |
TaskChain.abortIfNot(T ifNotObj)
|
TaskChain<T> |
TaskChain.abortIfNot(T ifNotObj,
TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
TaskChain.abortIfNot(T ifNotObj,
TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
TaskChain.abortIfNot(T ifNotObj,
TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
TaskChain.abortIfNot(T ifNotObj,
TaskChainAbortAction<A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)
|
TaskChain<T> |
TaskChain.abortIfNull()
Checks if the previous task return was null.
|
TaskChain<T> |
TaskChain.abortIfNull(TaskChainAbortAction<?,?,?> action)
|
<A1> TaskChain<T> |
TaskChain.abortIfNull(TaskChainAbortAction<A1,?,?> action,
A1 arg1)
|
<A1,A2> TaskChain<T> |
TaskChain.abortIfNull(TaskChainAbortAction<A1,A2,?> action,
A1 arg1,
A2 arg2)
|
<A1,A2,A3> TaskChain<T> |
TaskChain.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 |
TaskChain.add0(co.aikar.taskchain.TaskChain.TaskHolder<?,?> task) |
TaskChain<?> |
TaskChain.async(TaskChainTasks.GenericTask task)
TaskChain#sync(GenericTask) but ran off main thread |
<R> TaskChain<R> |
TaskChain.async(TaskChainTasks.Task<R,T> task)
TaskChain#sync(Task) but ran off main thread |
TaskChain<?> |
TaskChain.asyncCallback(TaskChainTasks.AsyncExecutingGenericTask task)
TaskChain#syncCallback(AsyncExecutingTask) but ran off main thread |
<R> TaskChain<R> |
TaskChain.asyncCallback(TaskChainTasks.AsyncExecutingTask<R,T> task)
TaskChain#syncCallback(AsyncExecutingTask) but ran off main thread |
<R> TaskChain<R> |
TaskChain.asyncFirst(TaskChainTasks.FirstTask<R> task)
TaskChain#syncFirst(FirstTask) but ran off main thread |
<R> TaskChain<R> |
TaskChain.asyncFirstCallback(TaskChainTasks.AsyncExecutingFirstTask<R> task)
TaskChain#syncFirstCallback(AsyncExecutingFirstTask) but ran off main thread |
<R> TaskChain<R> |
TaskChain.asyncFirstFuture(TaskChainTasks.FutureFirstTask<R> task)
TaskChain#syncFirstFuture(FutureFirstTask) but ran off main thread |
<R> TaskChain<List<R>> |
TaskChain.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<?> |
TaskChain.asyncFuture(TaskChainTasks.FutureGenericTask task)
TaskChain#syncFuture(FutureTask) but the future provider is ran off main thread |
<R> TaskChain<R> |
TaskChain.asyncFuture(TaskChainTasks.FutureTask<R,T> task)
TaskChain#syncFuture(FutureTask) but the future provider is ran off main thread |
<R> TaskChain<List<R>> |
TaskChain.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<?> |
TaskChain.asyncLast(TaskChainTasks.LastTask<T> task)
TaskChain#syncLast(LastTask) but ran off main thread |
TaskChain<T> |
TaskChain.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<?> |
TaskChain.current(TaskChainTasks.GenericTask task)
TaskChain#sync(GenericTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
TaskChain.current(TaskChainTasks.Task<R,T> task)
TaskChain#sync(Task) but ran on current thread the Chain was created on |
TaskChain<?> |
TaskChain.currentCallback(TaskChainTasks.AsyncExecutingGenericTask task)
TaskChain#syncCallback(AsyncExecutingTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
TaskChain.currentCallback(TaskChainTasks.AsyncExecutingTask<R,T> task)
TaskChain#syncCallback(AsyncExecutingTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
TaskChain.currentFirst(TaskChainTasks.FirstTask<R> task)
TaskChain#syncFirst(FirstTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
TaskChain.currentFirstCallback(TaskChainTasks.AsyncExecutingFirstTask<R> task)
TaskChain#syncFirstCallback(AsyncExecutingFirstTask) but ran on current thread the Chain was created on |
<R> TaskChain<R> |
TaskChain.currentFirstFuture(TaskChainTasks.FutureFirstTask<R> task)
TaskChain#syncFirstFuture(FutureFirstTask) but ran on current thread the Chain was created on |
<R> TaskChain<List<R>> |
TaskChain.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<?> |
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> |
TaskChain.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>> |
TaskChain.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<?> |
TaskChain.currentLast(TaskChainTasks.LastTask<T> task)
TaskChain#syncLast(LastTask) but ran on current thread the Chain was created on |
TaskChain<T> |
TaskChain.delay(int gameUnits)
IMPLEMENTATION SPECIFIC!!
Consult your application implementation to understand how long 1 unit is.
|
TaskChain<T> |
TaskChain.delay(int duration,
TimeUnit unit)
Adds a real time delay to the chain execution.
|
<R> TaskChain<R> |
TaskChain.future(CompletableFuture<R> future)
Takes a supplied Future, and holds processing of the chain until the future completes.
|
<R> TaskChain<List<R>> |
TaskChain.futures(CompletableFuture<R>... futures)
Takes multiple supplied Futures, and holds processing of the chain until the futures completes.
|
<R> TaskChain<List<R>> |
TaskChain.futures(List<CompletableFuture<R>> futures)
Takes multiple supplied Futures, and holds processing of the chain until the futures completes.
|
default TaskChain<?> |
TaskChainTasks.Task.getCurrentChain() |
static TaskChain<?> |
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.
|
<T> TaskChain<T> |
TaskChainFactory.newChain()
Creates a new chain.
|
<T> TaskChain<T> |
TaskChainFactory.newSharedChain(String name)
Allows re-use of a Chain by giving it a name.
|
TaskChain<TaskChain<?>> |
TaskChain.returnChain()
Returns the chain itself to the next task.
|
<R> TaskChain<R> |
TaskChain.returnData(String key)
Reads the specified key from Task Data, and passes it to the next task.
|
TaskChain<T> |
TaskChain.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<?> |
TaskChain.sync(TaskChainTasks.GenericTask task)
Execute task on main thread, with no input or output
|
<R> TaskChain<R> |
TaskChain.sync(TaskChainTasks.Task<R,T> task)
Execute task on main thread, with the last returned input, returning an output
|
TaskChain<?> |
TaskChain.syncCallback(TaskChainTasks.AsyncExecutingGenericTask task)
TaskChain#syncCallback(AsyncExecutingTask) , ran on main thread but no input or output |
<R> TaskChain<R> |
TaskChain.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> |
TaskChain.syncFirst(TaskChainTasks.FirstTask<R> task)
Execute task on main thread, with no input, returning an output
|
<R> TaskChain<R> |
TaskChain.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> |
TaskChain.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>> |
TaskChain.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<?> |
TaskChain.syncFuture(TaskChainTasks.FutureGenericTask task)
TaskChain#syncFuture(FutureTask) , ran on main thread but no input or output |
<R> TaskChain<R> |
TaskChain.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>> |
TaskChain.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<?> |
TaskChain.syncLast(TaskChainTasks.LastTask<T> task)
Execute task on main thread, with the last output, and no furthur output
|
Modifier and Type | Method and Description |
---|---|
TaskChain<TaskChain<?>> |
TaskChain.returnChain()
Returns the chain itself to the next task.
|
Modifier and Type | Method and Description |
---|---|
default void |
TaskChainNullAction.onAbort(TaskChain<?> chain,
A1 arg1)
Deprecated.
|
default void |
TaskChainAbortAction.onAbort(TaskChain<?> chain,
A1 arg1) |
default void |
TaskChainNullAction.onAbort(TaskChain<?> chain,
A1 arg1,
A2 arg2)
Deprecated.
|
default void |
TaskChainAbortAction.onAbort(TaskChain<?> chain,
A1 arg1,
A2 arg2) |
default void |
TaskChainNullAction.onAbort(TaskChain<?> chain,
A1 arg1,
A2 arg2,
A3 arg3)
Deprecated.
|
default void |
TaskChainAbortAction.onAbort(TaskChain<?> chain,
A1 arg1,
A2 arg2,
A3 arg3) |
default void |
TaskChainNullAction.onNull(TaskChain<?> chain,
A1 arg1)
Deprecated.
|
default void |
TaskChainNullAction.onNull(TaskChain<?> chain,
A1 arg1,
A2 arg2)
Deprecated.
|
default void |
TaskChainNullAction.onNull(TaskChain<?> chain,
A1 arg1,
A2 arg2,
A3 arg3)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
TaskChain<T> |
TaskChain.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();
|
Copyright © 2018. All rights reserved.