Package org.axonframework.eventstore.fs

Examples of org.axonframework.eventstore.fs.SimpleEventFileResolver


*/
public class RunDisruptorCommandBus {

    public static void main(String[] args) throws InterruptedException {
        // we'll store Events on the FileSystem, in the "events" folder
        EventStore eventStore = new FileSystemEventStore(new SimpleEventFileResolver(new File("./events")));

        // a Simple Event Bus will do
        EventBus eventBus = new SimpleEventBus();

        // we register the event handlers
View Full Code Here


        // the CommandGateway provides a friendlier API to send commands
        CommandGateway commandGateway = new DefaultCommandGateway(commandBus);

        // we'll store Events on the FileSystem, in the "events" folder
        EventStore eventStore = new FileSystemEventStore(new SimpleEventFileResolver(new File("./events")));

        // a Simple Event Bus will do
        EventBus eventBus = new SimpleEventBus();

        // we need to configure the repository
View Full Code Here

        FileUtils.deleteDirectory(eventsDir);

        // we create a serializer, so we can ensure the event store and the upcasters use the same configuration
        Serializer serializer = new XStreamSerializer();
        // initialize a FileSystem Event Store
        FileSystemEventStore eventStore = new FileSystemEventStore(serializer, new SimpleEventFileResolver(eventsDir));
        // initialize the upcaster chain with our upcaster
        eventStore.setUpcasterChain(new LazyUpcasterChain(serializer,
                                                          Collections.<Upcaster>singletonList(new ToDoItemUpcaster())));

        // we append some events. Notice we append a "ToDoItemCreatedEvent".
View Full Code Here

        // the CommandGateway provides a friendlier API to send commands
        CommandGateway commandGateway = new DefaultCommandGateway(commandBus);

        // we'll store Events on the FileSystem, in the "events" folder
        EventStore eventStore = new FileSystemEventStore(new SimpleEventFileResolver(new File("./events")));

        // a Simple Event Bus will do
        EventBus eventBus = new SimpleEventBus();

        // we need to configure the repository
View Full Code Here

        eventBus = new SimpleEventBus();
        eventBus.subscribe(new LoggingEventListener(events));
        events.clear();

        EventStore eventStore = new FileSystemEventStore(new SimpleEventFileResolver(tempFolder.newFolder()));
        AggregateFactory<Aggregate> aggregateFactory = new GenericAggregateFactory<Aggregate>(Aggregate.class);
        repository = new CachingEventSourcingRepository<Aggregate>(aggregateFactory, eventStore);
        repository.setEventBus(eventBus);

        uowFactory = new DefaultUnitOfWorkFactory();
View Full Code Here

    private final EventFileResolver delegate;
    private final ConcurrentMap<String, OutputStreamWrapper> openFiles = new ConcurrentSkipListMap<String, OutputStreamWrapper>();

    public CachingEventFileResolver(File baseDir) {
        this.delegate = new SimpleEventFileResolver(baseDir);
    }
View Full Code Here

TOP

Related Classes of org.axonframework.eventstore.fs.SimpleEventFileResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.