Interface MCRProcessableExecutor


public interface MCRProcessableExecutor
A processable executor uses a ExecutorService to submit given tasks and returns a MCRProcessableSupplier.
Author:
Matthias Eichner
  • Method Details

    • submit

      default MCRProcessableSupplier<?> submit(Runnable runnable)
      Submits the runnable with priority zero (executed at last).
      Parameters:
      runnable - the runnable to submit
      Returns:
      a MCRProcessableSupplier with no result
    • submit

      default MCRProcessableSupplier<?> submit(Runnable runnable, int priority)
      Submits the runnable with the given priority.
      Parameters:
      runnable - the runnable to submit
      Returns:
      a MCRProcessableSupplier with no result
    • submit

      default <R> MCRProcessableSupplier<R> submit(Callable<R> callable)
      Submits the callable with priority zero (executed at last).
      Parameters:
      callable - the callable to submit
      Returns:
      a MCRProcessableSupplier with the result of R
    • submit

      <R> MCRProcessableSupplier<R> submit(Callable<R> callable, int priority)
      Submits the callable with the given priority.
      Parameters:
      callable - the callable to submit
      Returns:
      a MCRProcessableSupplier with the result of R
    • getExecutor

      ExecutorService getExecutor()
      Returns the underlying executor service.

      You should not submit task to this thread pool directly. Use the submit methods of this class instead.

      Returns:
      the thread pool.