Class: Synapse::EventSourcing::EventSourcingRepository
Overview
Repository that initializes the state of aggregates using events read from an event store and appends changes to aggregates to an event store
Instance Attribute Summary collapse
#lock_manager
Instance Method Summary
collapse
#add, #load
Constructor Details
#initialize(aggregate_factory, event_store, lock_manager) ⇒ undefined
28
29
30
31
32
33
34
|
# File 'lib/synapse/event_sourcing/repository.rb', line 28
def initialize(aggregate_factory, event_store, lock_manager)
super lock_manager
@aggregate_factory = aggregate_factory
@event_store = event_store
@stream_decorators = Array.new
end
|
Instance Attribute Details
7
8
9
|
# File 'lib/synapse/event_sourcing/repository.rb', line 7
def aggregate_factory
@aggregate_factory
end
|
10
11
12
|
# File 'lib/synapse/event_sourcing/repository.rb', line 10
def conflict_resolver
@conflict_resolver
end
|
13
14
15
|
# File 'lib/synapse/event_sourcing/repository.rb', line 13
def event_store
@event_store
end
|
16
17
18
|
# File 'lib/synapse/event_sourcing/repository.rb', line 16
def snapshot_policy
@snapshot_policy
end
|
19
20
21
|
# File 'lib/synapse/event_sourcing/repository.rb', line 19
def snapshot_taker
@snapshot_taker
end
|
22
23
24
|
# File 'lib/synapse/event_sourcing/repository.rb', line 22
def stream_decorators
@stream_decorators
end
|