Package org.axonframework.common.util
Interface ExecutorServiceFactory<C>
- Type Parameters:
C- The type of configuration to use for constructing aExecutorService.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A Functional Interface towards a
, but maintaining the option for the
framework to provide a
BiFunction which ingests both a Configuration and a BlockingQueue of
Runnable, and outputs an ExecutorService. Provides a means to allow configuration of the used
ExecutorService in, for example, the
invalid reference
org.axonframework.commandhandling.distributed.DistributedCommandBus
BlockingQueue which is tailored towards message prioritization when building the
executor.
Before 5.0.0 this class was specific for the Axon Server configuration, but it has been generalized to allow other
configurations to provide their own ExecutorService implementations as well.
- Since:
- 5.0.0
- Author:
- Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptioncreateExecutorService(C configuration, BlockingQueue<Runnable> queue)
-
Method Details
-
createExecutorService
@Nonnull ExecutorService createExecutorService(@Nonnull C configuration, @Nonnull BlockingQueue<Runnable> queue) - Parameters:
configuration- The Configuration to use for the ExecutorService.queue- TheBlockingQueueto use for the ExecutorService.- Returns:
- An
ExecutorServicebased on the givenconfigurationandqueue.
-