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 Type
    Method
    Description
    after(long ticks)
    Marks that the new task should run after the specified delay, and returns the next builder in the chain.
    after(long duration, @NotNull TimeUnit unit)
    Marks that the new task should run after the specified delay, and returns the next builder in the chain.
    afterAndEvery(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.
    afterAndEvery(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.
    every(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.
    every(long duration, @NotNull TimeUnit unit)
    Marks that the new task should start running instantly, but repeat on the specified interval, and returns the next builder in the chain.
    now()
    Marks that the new task should execute immediately, and returns the next builder in the chain.
  • Method Details

    • now

      @NotNull @NotNull ContextualPromiseBuilder now()
      Marks that the new task should execute immediately, and returns the next builder in the chain.
      Returns:
      an "instant" promise builder
    • after

      @NotNull TaskBuilder.DelayedTick after(long ticks)
      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

      @NotNull TaskBuilder.DelayedTime after(long duration, @NotNull @NotNull TimeUnit unit)
      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 by
      unit - the units of the duration
      Returns:
      a delayed builder
    • afterAndEvery

      @NotNull @NotNull ContextualTaskBuilder afterAndEvery(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.
      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 by
      unit - the units of the duration
      Returns:
      a delayed builder
    • every

      @NotNull @NotNull ContextualTaskBuilder every(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.
      Parameters:
      ticks - the number of ticks to wait between executions
      Returns:
      a delayed builder
    • every

      @NotNull @NotNull ContextualTaskBuilder every(long duration, @NotNull @NotNull TimeUnit unit)
      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 executions
      unit - the units of the duration
      Returns:
      a delayed builder