org.axonframework.eventstore
Interface EventStore

All Known Subinterfaces:
SnapshotEventStore
All Known Implementing Classes:
FileSystemEventStore, GaeEventStore, JdbcEventStore, JpaEventStore, MongoEventStore, MongoEventStore, RunEventReplay.StubEventStore, SequenceEventStore, TimestampCutoffReadonlyEventStore, VolatileEventStore

public interface EventStore

Abstraction of the event storage mechanism. Domain Events are stored and read as streams.

Since:
0.1
Author:
Allard Buijze

Method Summary
 void appendEvents(String type, DomainEventStream events)
          Append the events in the given stream to the event store.
 DomainEventStream readEvents(String type, Object identifier)
          Read the events of the aggregate identified by the given type and identifier that allow the current aggregate state to be rebuilt.
 

Method Detail

appendEvents

void appendEvents(String type,
                  DomainEventStream events)
Append the events in the given stream to the event store.

Parameters:
type - The type descriptor of the object to store
events - The event stream containing the events to store
Throws:
EventStoreException - if an error occurs while storing the events in the event stream

readEvents

DomainEventStream readEvents(String type,
                             Object identifier)
Read the events of the aggregate identified by the given type and identifier that allow the current aggregate state to be rebuilt. Implementations may omit or replace events (e.g. by using snapshot events) from the stream for performance purposes.

Parameters:
type - The type descriptor of the object to retrieve
identifier - The unique aggregate identifier of the events to load
Returns:
an event stream containing the events of the aggregate
Throws:
EventStoreException - if an error occurs while reading the events in the event stream


Copyright © 2010-2016. All Rights Reserved.