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, #clear_tags, #identified_by, #initialize, #register_definition, #replace_tags, #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
15 16 17 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 15 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
48 49 50 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 48 def use_lock_manager(lock_manager) @lock_manager = lock_manager end |
#use_no_locking ⇒ undefined
Uses the lock manager with no locking
23 24 25 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 23 def use_no_locking @lock_manager_type = Repository::NullLockManager end |
#use_optimistic_locking ⇒ undefined
Uses the lock manager with optimistic locking
39 40 41 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 39 def use_optimistic_locking @lock_manager_type = Repository::OptimisticLockManager end |
#use_pessimistic_locking ⇒ undefined
Uses the lock manager with pessimistic locking
31 32 33 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 31 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
57 58 59 |
# File 'lib/synapse/configuration/component/repository/locking_repository.rb', line 57 def use_unit_provider(unit_provider) @unit_provider = unit_provider end |