Class: Synapse::EventStore::EventStore Abstract
- Inherits:
-
Object
- Object
- Synapse::EventStore::EventStore
- Defined in:
- lib/synapse/event_store/event_store.rb
Overview
This class is abstract.
Represents a mechanism for reading and appending streams of domain events
Direct Known Subclasses
Instance Method Summary collapse
-
#append_events(type_identifier, stream) ⇒ undefined
abstract
Appends the domain events in the given stream to the event store.
-
#read_events(type_identifier, aggregate_id) ⇒ DomainEventStream
abstract
Fetches an event stream for the aggregate identified by the given type identifier and the given aggregate identifier.
Instance Method Details
#append_events(type_identifier, stream) ⇒ undefined
This method is abstract.
Appends the domain events in the given stream to the event store
29 30 31 |
# File 'lib/synapse/event_store/event_store.rb', line 29 def append_events(type_identifier, stream) raise NotImplementedError end |
#read_events(type_identifier, aggregate_id) ⇒ DomainEventStream
This method is abstract.
Fetches an event stream for the aggregate identified by the given type identifier and the given aggregate identifier. This stream can be used to rebuild the state of the aggregate.
Implementations may omit or replace events (for example, with snapshot events) from the stream for performance purposes.
18 19 20 |
# File 'lib/synapse/event_store/event_store.rb', line 18 def read_events(type_identifier, aggregate_id) raise NotImplementedError end |