@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 | Field and Description |
---|---|
static long |
THREAD_KEEP_ALIVE_TIME |
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. |
andThen, apply
static final long THREAD_KEEP_ALIVE_TIME
static ExecutorServiceBuilder defaultCommandExecutorServiceBuilder()
ThreadPoolExecutor
for processing incoming
commands. Uses the AxonServerConfiguration.getCommandThreads()
as the core and maximum pool size, a
keep-alive time of 100ms
, 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, a
keep-alive time of 100ms
, the given BlockingQueue
as the workQueue
and an AxonThreadFactory
.Copyright © 2010–2023. All rights reserved.