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, step_name: nil, run_at: nil) ⇒ Object
- #events_for(_execution_id) ⇒ Object
- #executions(**_options) ⇒ 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
- #steps_for(_execution_id) ⇒ Object
- #with_execution_lock(_execution_id) ⇒ Object
Constructor Details
#initialize(logger: ActiveSaga.configuration.logger, serializer: ActiveSaga.configuration.serializer, clock: ActiveSaga.configuration.clock) ⇒ Base
10 11 12 13 14 15 16 |
# File 'lib/active_saga/stores/base.rb', line 10 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.
8 9 10 |
# File 'lib/active_saga/stores/base.rb', line 8 def clock @clock end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
8 9 10 |
# File 'lib/active_saga/stores/base.rb', line 8 def logger @logger end |
#serializer ⇒ Object (readonly)
Returns the value of attribute serializer.
8 9 10 |
# File 'lib/active_saga/stores/base.rb', line 8 def serializer @serializer end |
Instance Method Details
#cancel_execution!(_execution_id, reason: nil) ⇒ Object
58 59 60 |
# File 'lib/active_saga/stores/base.rb', line 58 def cancel_execution!(_execution_id, reason: nil) raise NotImplementedError end |
#complete_step!(*_args) ⇒ Object
26 27 28 |
# File 'lib/active_saga/stores/base.rb', line 26 def complete_step!(*_args) raise NotImplementedError end |
#enqueue_runner(_execution, step_name: nil, run_at: nil) ⇒ Object
50 51 52 |
# File 'lib/active_saga/stores/base.rb', line 50 def enqueue_runner(_execution, step_name: nil, run_at: nil) raise NotImplementedError end |
#events_for(_execution_id) ⇒ Object
70 71 72 |
# File 'lib/active_saga/stores/base.rb', line 70 def events_for(_execution_id) raise NotImplementedError end |
#executions(**_options) ⇒ Object
62 63 64 |
# File 'lib/active_saga/stores/base.rb', line 62 def executions(**) raise NotImplementedError end |
#extend_timeout!(*_args) ⇒ Object
34 35 36 |
# File 'lib/active_saga/stores/base.rb', line 34 def extend_timeout!(*_args) raise NotImplementedError end |
#fail_step!(*_args) ⇒ Object
30 31 32 |
# File 'lib/active_saga/stores/base.rb', line 30 def fail_step!(*_args) raise NotImplementedError end |
#heartbeat!(*_args) ⇒ Object
38 39 40 |
# File 'lib/active_saga/stores/base.rb', line 38 def heartbeat!(*_args) raise NotImplementedError end |
#load_execution(_id) ⇒ Object
22 23 24 |
# File 'lib/active_saga/stores/base.rb', line 22 def load_execution(_id) raise NotImplementedError end |
#process_execution(_execution_id) ⇒ Object
46 47 48 |
# File 'lib/active_saga/stores/base.rb', line 46 def process_execution(_execution_id) raise NotImplementedError end |
#signal!(*_args) ⇒ Object
42 43 44 |
# File 'lib/active_saga/stores/base.rb', line 42 def signal!(*_args) raise NotImplementedError end |
#start_execution ⇒ Object
18 19 20 |
# File 'lib/active_saga/stores/base.rb', line 18 def start_execution(**) raise NotImplementedError end |
#steps_for(_execution_id) ⇒ Object
66 67 68 |
# File 'lib/active_saga/stores/base.rb', line 66 def steps_for(_execution_id) raise NotImplementedError end |
#with_execution_lock(_execution_id) ⇒ Object
54 55 56 |
# File 'lib/active_saga/stores/base.rb', line 54 def with_execution_lock(_execution_id) raise NotImplementedError end |