Interface TaskBuilder.ThreadContextual
- Enclosing interface:
- TaskBuilder
public static interface TaskBuilder.ThreadContextual
The next builder in the task chain, which already has a defined task context.
-
Method Summary
Modifier and TypeMethodDescriptionafter(long ticks) Marks that the new task should run after the specified delay, and returns the next builder in the chain.Marks that the new task should run after the specified delay, and returns the next builder in the chain.@NotNull ContextualTaskBuilderafterAndEvery(long ticks) Marks that the new task should run after the specified delay, then repeat on the specified interval, and returns the next builder in the chain.@NotNull ContextualTaskBuilderafterAndEvery(long duration, @NotNull TimeUnit unit) Marks that the new task should run after the specified delay, then repeat on the specified interval, and returns the next builder in the chain.@NotNull ContextualTaskBuilderevery(long ticks) Marks that the new task should start running instantly, but repeat on the specified interval, and returns the next builder in the chain.@NotNull ContextualTaskBuilderMarks that the new task should start running instantly, but repeat on the specified interval, and returns the next builder in the chain.@NotNull ContextualPromiseBuildernow()Marks that the new task should execute immediately, and returns the next builder in the chain.
-
Method Details
-
now
Marks that the new task should execute immediately, and returns the next builder in the chain.- Returns:
- an "instant" promise builder
-
after
Marks that the new task should run after the specified delay, and returns the next builder in the chain.- Parameters:
ticks- the number of ticks to delay execution by- Returns:
- a delayed builder
-
after
Marks that the new task should run after the specified delay, and returns the next builder in the chain.- Parameters:
duration- the duration to delay execution byunit- the units of the duration- Returns:
- a delayed builder
-
afterAndEvery
Marks that the new task should run after the specified delay, then repeat on the specified interval, and returns the next builder in the chain.- Parameters:
ticks- the number of ticks to delay execution by- Returns:
- a delayed builder
-
afterAndEvery
@NotNull @NotNull ContextualTaskBuilder afterAndEvery(long duration, @NotNull @NotNull TimeUnit unit) Marks that the new task should run after the specified delay, then repeat on the specified interval, and returns the next builder in the chain.- Parameters:
duration- the duration to delay execution byunit- the units of the duration- Returns:
- a delayed builder
-
every
Marks that the new task should start running instantly, but repeat on the specified interval, and returns the next builder in the chain.- Parameters:
ticks- the number of ticks to wait between executions- Returns:
- a delayed builder
-
every
Marks that the new task should start running instantly, but repeat on the specified interval, and returns the next builder in the chain.- Parameters:
duration- the duration to wait between executionsunit- the units of the duration- Returns:
- a delayed builder
-