Class: Synapse::Configuration::LockingRepositoryDefinitionBuilder Abstract
- Inherits:
-
DefinitionBuilder
- Object
- DefinitionBuilder
- Synapse::Configuration::LockingRepositoryDefinitionBuilder
- Defined in:
- lib/synapse/configuration/component/repository/locking_repository.rb
Overview
Definition builder that serves a base for building specific implementations of a locking repository
Direct Known Subclasses
EventSourcingRepositoryDefinitionBuilder, SimpleRepositoryDefinitionBuilder
Instance Attribute Summary
Attributes inherited from DefinitionBuilder
Instance Method Summary collapse
-
#use_event_bus(event_bus) ⇒ undefined
Changes the event bus used to publish aggregate events to.
-
#use_lock_manager(lock_manager) ⇒ undefined
Changes the lock manager used to prevent concurrent aggregate modification.
-
#use_no_locking ⇒ undefined
Uses the lock manager with no locking.
-
#use_optimistic_locking ⇒ undefined
Uses the lock manager with optimistic locking.
-
#use_pessimistic_locking ⇒ undefined
Uses the lock manager with pessimistic locking.
-
#use_unit_provider(unit_provider) ⇒ undefined
Changes the provider used to get the current unit of work.
Methods inherited from DefinitionBuilder
#anonymous, #as_prototype, #as_singleton, build, #build_composite, #build_definition, #identified_by, #initialize, #register_definition, #resolve, #resolve_tagged, #tag, #use_factory, #use_instance
Constructor Details
This class inherits a constructor from Synapse::Configuration::DefinitionBuilder
Instance Method Details
#use_event_bus(event_bus) ⇒ undefined
Changes the event bus used to publish aggregate events to
14 15 16 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 14 def use_event_bus(event_bus) @event_bus = event_bus end |
#use_lock_manager(lock_manager) ⇒ undefined
Changes the lock manager used to prevent concurrent aggregate modification
40 41 42 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 40 def use_lock_manager(lock_manager) @lock_manager = lock_manager end |
#use_no_locking ⇒ undefined
Uses the lock manager with no locking
20 21 22 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 20 def use_no_locking @lock_manager_type = Repository::NullLockManager end |
#use_optimistic_locking ⇒ undefined
Uses the lock manager with optimistic locking
32 33 34 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 32 def use_optimistic_locking @lock_manager_type = Repository::OptimisticLockManager end |
#use_pessimistic_locking ⇒ undefined
Uses the lock manager with pessimistic locking
26 27 28 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 26 def use_pessimistic_locking @lock_manager_type = Repository::PessimisticLockManager end |
#use_unit_provider(unit_provider) ⇒ undefined
Changes the provider used to get the current unit of work
48 49 50 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 48 def use_unit_provider(unit_provider) @unit_provider = unit_provider end |