@Override public EventProcessingConfigurer registerSagaStore( Function<Configuration, SagaStore> sagaStoreBuilder) { this.sagaStore.update(sagaStoreBuilder); return this; }
@Override public Configurer configureEventSerializer(Function<Configuration, Serializer> eventSerializerBuilder) { eventSerializer.update(eventSerializerBuilder); return this; }
@Override public Configurer configureMessageSerializer(Function<Configuration, Serializer> messageSerializerBuilder) { messageSerializer.update(messageSerializerBuilder); return this; }
@Override public EventProcessingConfigurer registerDefaultErrorHandler( Function<Configuration, ErrorHandler> errorHandlerBuilder) { this.defaultErrorHandler.update(errorHandlerBuilder); return this; }
/** * Defines the repository to use to load and store Aggregates of this type. The builder function receives the * global configuration object from which it can retrieve components the repository depends on. * * @param repositoryBuilder The builder function for the repository * @return this configurer instance for chaining */ public AggregateConfigurer<A> configureRepository(Function<Configuration, Repository<A>> repositoryBuilder) { repository.update(repositoryBuilder); return this; }
@Override public EventProcessingConfigurer registerTokenStore(Function<Configuration, TokenStore> tokenStore) { this.defaultTokenStore.update(tokenStore); return this; }
@Override public EventProcessingConfigurer registerDefaultSequencingPolicy( Function<Configuration, SequencingPolicy<? super EventMessage<?>>> policyBuilder) { this.defaultSequencingPolicy.update(policyBuilder); return this; }
/** * Defines the factory to use to to create new Aggregates instances of the type under configuration. * * @param aggregateFactoryBuilder The builder function for the AggregateFactory * @return this configurer instance for chaining */ public AggregateConfigurer<A> configureAggregateFactory( Function<Configuration, AggregateFactory<A>> aggregateFactoryBuilder) { aggregateFactory.update(aggregateFactoryBuilder); return this; }
/** * Defines the AggregateAnnotationCommandHandler instance to use. * * @param aggregateCommandHandlerBuilder The builder function for the AggregateCommandHandler * @return this configurer instance for chaining */ public AggregateConfigurer<A> configureCommandHandler( Function<Configuration, AggregateAnnotationCommandHandler> aggregateCommandHandlerBuilder) { commandHandler.update(aggregateCommandHandlerBuilder); return this; }
/** * Defines the CommandTargetResolver to use for the Aggregate type under configuration. The CommandTargetResolver * defines which Aggregate instance must be loaded to handle a specific Command. * * @param commandTargetResolverBuilder the builder function for the CommandTargetResolver. * @return this configurer instance for chaining */ public AggregateConfigurer<A> configureCommandTargetResolver( Function<Configuration, CommandTargetResolver> commandTargetResolverBuilder) { commandTargetResolver.update(commandTargetResolverBuilder); return this; }
@Override public Configurer configureCorrelationDataProviders( Function<Configuration, List<CorrelationDataProvider>> correlationDataProviderBuilder) { correlationProviders.update(correlationDataProviderBuilder); return this; }
@Override public EventProcessingConfigurer registerDefaultListenerInvocationErrorHandler( Function<Configuration, ListenerInvocationErrorHandler> listenerInvocationErrorHandlerBuilder) { defaultListenerInvocationErrorHandler.update(listenerInvocationErrorHandlerBuilder); return this; }
/** * Configures snapshotting for the Aggregate type under configuration. * <p> * Note that this configuration is ignored if a custom repository instance is configured. * * @param snapshotTriggerDefinition The function creating the SnapshotTriggerDefinition * @return this configurer instance for chaining */ public AggregateConfigurer<A> configureSnapshotTrigger( Function<Configuration, SnapshotTriggerDefinition> snapshotTriggerDefinition) { this.snapshotTriggerDefinition.update(snapshotTriggerDefinition); return this; }
@Override public Configurer registerHandlerDefinition( BiFunction<Configuration, Class, HandlerDefinition> handlerDefinitionClass) { this.handlerDefinition.update(c -> clazz -> handlerDefinitionClass.apply(c, clazz)); return this; }
@Override public Configurer configureEventSerializer(Function<Configuration, Serializer> eventSerializerBuilder) { eventSerializer.update(eventSerializerBuilder); return this; }
/** * Defines the CommandTargetResolver to use for the Aggregate type under configuration. The CommandTargetResolver * defines which Aggregate instance must be loaded to handle a specific Command. * * @param commandTargetResolverBuilder the builder function for the CommandTargetResolver. * @return this configurer instance for chaining */ public AggregateConfigurer<A> configureCommandTargetResolver( Function<Configuration, CommandTargetResolver> commandTargetResolverBuilder) { commandTargetResolver.update(commandTargetResolverBuilder); return this; }
@Override public EventProcessingConfigurer registerDefaultErrorHandler( Function<Configuration, ErrorHandler> errorHandlerBuilder) { this.defaultErrorHandler.update(errorHandlerBuilder); return this; }
@Override public Configurer configureMessageSerializer(Function<Configuration, Serializer> messageSerializerBuilder) { messageSerializer.update(messageSerializerBuilder); return this; }
/** * Defines the repository to use to load and store Aggregates of this type. The builder function receives the * global configuration object from which it can retrieve components the repository depends on. * * @param repositoryBuilder The builder function for the repository * @return this configurer instance for chaining */ public AggregateConfigurer<A> configureRepository(Function<Configuration, Repository<A>> repositoryBuilder) { repository.update(repositoryBuilder); return this; }
/** * Defines the CommandTargetResolver to use for the Aggregate type under configuration. The CommandTargetResolver * defines which Aggregate instance must be loaded to handle a specific Command. * * @param commandTargetResolverBuilder the builder function for the CommandTargetResolver. * @return this configurer instance for chaining */ public AggregateConfigurer<A> configureCommandTargetResolver( Function<Configuration, CommandTargetResolver> commandTargetResolverBuilder) { commandTargetResolver.update(commandTargetResolverBuilder); return this; }