Interface PersistentStreamScheduledExecutorBuilder
- All Superinterfaces:
BiFunction<Integer,String, ScheduledExecutorService>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface PersistentStreamScheduledExecutorBuilder
extends BiFunction<Integer,String,ScheduledExecutorService>
Functional interface towards constructing a
ScheduledExecutorService for a PersistentStreamMessageSource.- Since:
- 4.10.1
- Author:
- Steven van Beelen
-
Method Summary
Methods inherited from interface java.util.function.BiFunction
andThen, apply
-
Method Details
-
build
- Parameters:
threadCount- The requested thread count for the persistent stream. Can for example be used to define the pool size of theScheduledExecutorServiceunder construction.streamName- The name of the persistent stream. Can, for example, be used to define the name of theThreadFactorygiven to aScheduledExecutorService- Returns:
- A
ScheduledExecutorServicebased on the giventhreadCountandstreamName.
-
defaultFactory
DefaultPersistentStreamScheduledExecutorBuilder. Constructs aScheduledExecutorServiceby using the giventhreadCountas the pool size for the executor. Uses the givenstreamNameto build anAxonThreadFactorywith the group name"PersistentStream[{streamName}]".- Returns:
- The default
PersistentStreamScheduledExecutorBuilder.
-