Interface MCRProcessableExecutor
public interface MCRProcessableExecutor
A processable executor uses a
ExecutorService
to submit
given tasks and returns a MCRProcessableSupplier
.- Author:
- Matthias Eichner
-
Method Summary
Modifier and TypeMethodDescriptionReturns the underlying executor service.default MCRProcessableSupplier<?>
Submits the runnable with priority zero (executed at last).default MCRProcessableSupplier<?>
Submits the runnable with the given priority.default <R> MCRProcessableSupplier<R>
Submits the callable with priority zero (executed at last).<R> MCRProcessableSupplier<R>
Submits the callable with the given priority.
-
Method Details
-
submit
Submits the runnable with priority zero (executed at last).- Parameters:
runnable
- the runnable to submit- Returns:
- a
MCRProcessableSupplier
with no result
-
submit
Submits the runnable with the given priority.- Parameters:
runnable
- the runnable to submit- Returns:
- a
MCRProcessableSupplier
with no result
-
submit
Submits the callable with priority zero (executed at last).- Parameters:
callable
- the callable to submit- Returns:
- a
MCRProcessableSupplier
with the result of R
-
submit
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.
-