Interface TaskBuilder


public interface TaskBuilder
Functional builder providing chained access to the functionality in Scheduler;
  • Method Details

    • newBuilder

      @NotNull static @NotNull TaskBuilder newBuilder()
      Gets a task builder instance
      Returns:
      a task builder instance
    • on

      @NotNull default TaskBuilder.ThreadContextual on(@NotNull @NotNull ThreadContext context)
      Defines the thread context of the new task, and returns the next builder in the chain.
      Parameters:
      context - the context to run the task in
      Returns:
      a contextual builder
    • sync

      Marks that the new task should run sync, and returns the next builder in the chain.
      Returns:
      a "sync" contextual builder
    • async

      Marks that the new task should run async, and returns the next builder in the chain.
      Returns:
      an "async" contextual builder