Interface JobScheduler.IterateAction<CONTEXT_TYPE extends JobScheduler.JobThreadContext>

Enclosing interface:
JobScheduler
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface JobScheduler.IterateAction<CONTEXT_TYPE extends JobScheduler.JobThreadContext>
Helper interface for iterateSerial() and iterateParallel(). This provides a functional interface with index indicating which iteration to perform. When this returns, the scheduler will automatically schedule the next iteration.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run(CONTEXT_TYPE taskThreadContext, int index, Consumer<Exception> nestedErrorConsumer)
    Iteration action to be invoked.
  • Method Details

    • run

      void run(CONTEXT_TYPE taskThreadContext, int index, Consumer<Exception> nestedErrorConsumer)
      Iteration action to be invoked.
      Parameters:
      taskThreadContext - The context, unique to this task-thread
      index - The iteration number
      nestedErrorConsumer - A consumer to pass to directly-nested iterative jobs