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 PersistentStreamEventSource.- Since:
- 5.2.0
- 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, which can for example be used to define the pool size of theScheduledExecutorServiceunder constructionstreamName- the name of the persistent stream, which 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
-