org.axonframework.eventsourcing.eventstore.EventStore Java Examples

The following examples show how to use org.axonframework.eventsourcing.eventstore.EventStore. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TraderAggregateDataInitializer.java    From ESarch with Apache License 2.0 5 votes vote down vote up
public TraderAggregateDataInitializer(CommandGateway commandGateway,
                                      EventStore eventStore,
                                      QueryGateway queryGateway,
                                      CommandRouter commandRouter) {
  this.commandGateway = commandGateway;
  this.eventStore = eventStore;
  this.queryGateway = queryGateway;
  this.commandRouter = commandRouter;
}
 
Example #2
Source File: GcCommandConfiguration.java    From giftcard-demo with Apache License 2.0 5 votes vote down vote up
@Bean
public Repository<GiftCard> giftCardRepository(EventStore eventStore, Cache cache) {
    return EventSourcingRepository.builder(GiftCard.class)
                                  .cache(cache)
                                  .eventStore(eventStore)
                                  .build();
}
 
Example #3
Source File: AxonSnapshotConfiguration.java    From hesperides with GNU General Public License v3.0 5 votes vote down vote up
@Bean
public SpringAggregateSnapshotter snapshotter(ParameterResolverFactory parameterResolverFactory,
                                              EventStore eventStore,
                                              TransactionManager transactionManager) {

    // https://docs.axoniq.io/reference-guide/v/3.3/part-iii-infrastructure-components/repository-and-event-store#creating-a-snapshot
    // (...) Therefore, it is recommended to run the snapshotter in a different thread (...)
    Executor executor = Executors.newSingleThreadExecutor();
    return new SpringAggregateSnapshotter(eventStore, parameterResolverFactory, executor, transactionManager);
}