Class: ActiveSaga::Stores::Base
- Inherits:
-
Object
- Object
- ActiveSaga::Stores::Base
- Defined in:
- lib/active_saga/stores/base.rb
Overview
Base interface for persistence adapters.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#clock ⇒ Object
readonly
Returns the value of attribute clock.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#serializer ⇒ Object
readonly
Returns the value of attribute serializer.
Instance Method Summary collapse
- #cancel_execution!(_execution_id, reason: nil) ⇒ Object
- #complete_step!(*_args) ⇒ Object
- #enqueue_runner(_execution_id, _step_name = nil) ⇒ Object
- #extend_timeout!(*_args) ⇒ Object
- #fail_step!(*_args) ⇒ Object
- #heartbeat!(*_args) ⇒ Object
-
#initialize(logger: ActiveSaga.configuration.logger, serializer: ActiveSaga.configuration.serializer, clock: ActiveSaga.configuration.clock) ⇒ Base
constructor
A new instance of Base.
- #load_execution(_id) ⇒ Object
- #process_execution(_execution_id) ⇒ Object
- #signal!(*_args) ⇒ Object
- #start_execution ⇒ Object
- #with_execution_lock(_execution_id) ⇒ Object
Constructor Details
#initialize(logger: ActiveSaga.configuration.logger, serializer: ActiveSaga.configuration.serializer, clock: ActiveSaga.configuration.clock) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 15 |
# File 'lib/active_saga/stores/base.rb', line 9 def initialize(logger: ActiveSaga.configuration.logger, serializer: ActiveSaga.configuration.serializer, clock: ActiveSaga.configuration.clock) @logger = logger @serializer = serializer @clock = clock end |
Instance Attribute Details
#clock ⇒ Object (readonly)
Returns the value of attribute clock.
7 8 9 |
# File 'lib/active_saga/stores/base.rb', line 7 def clock @clock end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
7 8 9 |
# File 'lib/active_saga/stores/base.rb', line 7 def logger @logger end |
#serializer ⇒ Object (readonly)
Returns the value of attribute serializer.
7 8 9 |
# File 'lib/active_saga/stores/base.rb', line 7 def serializer @serializer end |
Instance Method Details
#cancel_execution!(_execution_id, reason: nil) ⇒ Object
57 58 59 |
# File 'lib/active_saga/stores/base.rb', line 57 def cancel_execution!(_execution_id, reason: nil) raise NotImplementedError end |
#complete_step!(*_args) ⇒ Object
25 26 27 |
# File 'lib/active_saga/stores/base.rb', line 25 def complete_step!(*_args) raise NotImplementedError end |
#enqueue_runner(_execution_id, _step_name = nil) ⇒ Object
49 50 51 |
# File 'lib/active_saga/stores/base.rb', line 49 def enqueue_runner(_execution_id, _step_name = nil) raise NotImplementedError end |
#extend_timeout!(*_args) ⇒ Object
33 34 35 |
# File 'lib/active_saga/stores/base.rb', line 33 def extend_timeout!(*_args) raise NotImplementedError end |
#fail_step!(*_args) ⇒ Object
29 30 31 |
# File 'lib/active_saga/stores/base.rb', line 29 def fail_step!(*_args) raise NotImplementedError end |
#heartbeat!(*_args) ⇒ Object
37 38 39 |
# File 'lib/active_saga/stores/base.rb', line 37 def heartbeat!(*_args) raise NotImplementedError end |
#load_execution(_id) ⇒ Object
21 22 23 |
# File 'lib/active_saga/stores/base.rb', line 21 def load_execution(_id) raise NotImplementedError end |
#process_execution(_execution_id) ⇒ Object
45 46 47 |
# File 'lib/active_saga/stores/base.rb', line 45 def process_execution(_execution_id) raise NotImplementedError end |
#signal!(*_args) ⇒ Object
41 42 43 |
# File 'lib/active_saga/stores/base.rb', line 41 def signal!(*_args) raise NotImplementedError end |
#start_execution ⇒ Object
17 18 19 |
# File 'lib/active_saga/stores/base.rb', line 17 def start_execution(**) raise NotImplementedError end |
#with_execution_lock(_execution_id) ⇒ Object
53 54 55 |
# File 'lib/active_saga/stores/base.rb', line 53 def with_execution_lock(_execution_id) raise NotImplementedError end |