All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cqrs.base.EventStore Maven / Gradle / Ivy

package com.cqrs.base;

import com.cqrs.aggregates.AggregateDescriptor;
import com.cqrs.event_store.SeekableEventStream;
import com.cqrs.event_store.exceptions.StorageException;
import com.cqrs.events.EventWithMetaData;

import java.util.ConcurrentModificationException;
import java.util.List;
import java.util.function.Predicate;

public interface EventStore {

    int loadEventsForAggregate(AggregateDescriptor aggregateDescriptor, Predicate consumer) throws StorageException;

    void appendEventsForAggregate(AggregateDescriptor aggregateDescriptor, List eventsWithMetaData, int expectedVersion)
            throws ConcurrentModificationException, StorageException;

    void loadEventsByClassNames(List eventClasses, Predicate consumer) throws StorageException;
    int countEventsByClassNames(List eventClasses) throws StorageException;

    EventWithMetaData findEventById(String eventId) throws StorageException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy