@FunctionalInterface public interface ExecutorServiceBuilder extends BiFunction<AxonServerConfiguration,BlockingQueue<Runnable>,ExecutorService>
BiFunction
which ingests both an AxonServerConfiguration
and a
BlockingQueue
of Runnable
, and outputs an ExecutorService
. Provides a means to allow
configuration of the used ExecutorService in for example the AxonServerCommandBus
,
but maintaining the option for the framework to provide a BlockingQueue which is tailored towards message
prioritization when building the executor.Modifier and Type | Method and Description |
---|---|
static ExecutorServiceBuilder |
defaultCommandExecutorServiceBuilder()
Create a default ExecutorServiceBuilder used to create a
ThreadPoolExecutor for processing incoming
commands. |
static ExecutorServiceBuilder |
defaultQueryExecutorServiceBuilder()
Create a default ExecutorServiceBuilder used to create a
ThreadPoolExecutor for processing incoming
queries. |
static ExecutorServiceBuilder |
defaultQueryResponseExecutorServiceBuilder()
Create a default ExecutorServiceBuilder used to create a
ThreadPoolExecutor for processing incoming
query responses. |
andThen, apply
static ExecutorServiceBuilder defaultCommandExecutorServiceBuilder()
ThreadPoolExecutor
for processing incoming
commands. Uses the AxonServerConfiguration.getCommandThreads()
as the core and maximum pool size,
the given BlockingQueue
as the workQueue
and an AxonThreadFactory
.static ExecutorServiceBuilder defaultQueryExecutorServiceBuilder()
ThreadPoolExecutor
for processing incoming
queries. Uses the AxonServerConfiguration.getQueryThreads()
as the core and maximum pool size,
the given BlockingQueue
as the workQueue
and an AxonThreadFactory
.static ExecutorServiceBuilder defaultQueryResponseExecutorServiceBuilder()
ThreadPoolExecutor
for processing incoming
query responses.
Uses the AxonServerConfiguration.getQueryResponseThreads()
as the core and maximum pool size,
the given BlockingQueue
as the workQueue
and an AxonThreadFactory
.Copyright © 2010–2025. All rights reserved.