/** * Instantiate a {@link AggregateSnapshotter} based on the fields contained in the {@link Builder}. * <p> * Will assert that the {@link EventStore}, {@link ParameterResolverFactory} and {@link HandlerDefinition} are not * {@code null}, and will throw an {@link AxonConfigurationException} if any of them is {@code null}. * * @param builder the {@link Builder} used to instantiate a {@link AggregateSnapshotter} instance */ protected AggregateSnapshotter(Builder builder) { super(builder); this.aggregateFactories = new ConcurrentHashMap<>(builder.aggregateFactories); this.repositoryProvider = builder.repositoryProvider; this.parameterResolverFactory = builder.buildParameterResolverFactory(); this.handlerDefinition = builder.buildHandlerDefinition(); }
/** * Instantiate a {@link AggregateSnapshotter} based on the fields contained in the {@link Builder}. * <p> * Will assert that the {@link EventStore}, {@link ParameterResolverFactory} and {@link HandlerDefinition} are not * {@code null}, and will throw an {@link AxonConfigurationException} if any of them is {@code null}. * * @param builder the {@link Builder} used to instantiate a {@link AggregateSnapshotter} instance */ protected AggregateSnapshotter(Builder builder) { super(builder); this.aggregateFactories = new ConcurrentHashMap<>(builder.aggregateFactories); this.repositoryProvider = builder.repositoryProvider; this.parameterResolverFactory = builder.buildParameterResolverFactory(); this.handlerDefinition = builder.buildHandlerDefinition(); }