Class: SolidFlow::Stores::Base
- Inherits:
-
Object
- Object
- SolidFlow::Stores::Base
- Defined in:
- lib/solid_flow/stores/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#event_serializer ⇒ Object
readonly
Returns the value of attribute event_serializer.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#time_provider ⇒ Object
readonly
Returns the value of attribute time_provider.
Instance Method Summary collapse
- #append_event(execution_id:, type:, payload:) ⇒ Object
- #enqueue_execution(execution_id:, reason:) ⇒ Object
-
#initialize(event_serializer:, time_provider:, logger:) ⇒ Base
constructor
A new instance of Base.
- #load_history(execution_id) ⇒ Object
- #mark_timer_fired(timer_id:) ⇒ Object
- #persist_context(execution_id:, ctx:) ⇒ Object
- #persist_signal_consumed(execution_id:, signal_name:) ⇒ Object
- #query_execution(execution_id:, workflow_class:) ⇒ Object
- #record_compensation_failure(execution_id:, step:, compensation_task:, error:) ⇒ Object
- #record_compensation_result(execution_id:, step:, compensation_task:, result:) ⇒ Object
- #record_task_failure(execution_id:, step:, attempt:, error:, retryable:) ⇒ Object
- #record_task_result(execution_id:, step:, result:, attempt:, ctx_snapshot:, idempotency_key:) ⇒ Object
- #schedule_compensation(execution_id:, workflow_class:, step:, compensation_task:, context:) ⇒ Object
- #schedule_task(execution_id:, step:, task:, arguments:, headers:, run_at: nil) ⇒ Object
- #schedule_timer(execution_id:, step:, run_at:, instruction:, metadata:) ⇒ Object
- #signal_execution(execution_id:, workflow_class:, signal_name:, payload:) ⇒ Object
- #start_execution(workflow_class:, input:, graph_signature:) ⇒ Object
- #update_execution(execution_id:, attributes:) ⇒ Object
- #with_execution(execution_id, lock: true) ⇒ Object
Constructor Details
#initialize(event_serializer:, time_provider:, logger:) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 |
# File 'lib/solid_flow/stores/base.rb', line 6 def initialize(event_serializer:, time_provider:, logger:) @event_serializer = event_serializer @time_provider = time_provider @logger = logger end |
Instance Attribute Details
#event_serializer ⇒ Object (readonly)
Returns the value of attribute event_serializer.
12 13 14 |
# File 'lib/solid_flow/stores/base.rb', line 12 def event_serializer @event_serializer end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
12 13 14 |
# File 'lib/solid_flow/stores/base.rb', line 12 def logger @logger end |
#time_provider ⇒ Object (readonly)
Returns the value of attribute time_provider.
12 13 14 |
# File 'lib/solid_flow/stores/base.rb', line 12 def time_provider @time_provider end |
Instance Method Details
#append_event(execution_id:, type:, payload:) ⇒ Object
34 35 36 |
# File 'lib/solid_flow/stores/base.rb', line 34 def append_event(execution_id:, type:, payload:) raise NotImplementedError end |
#enqueue_execution(execution_id:, reason:) ⇒ Object
46 47 48 |
# File 'lib/solid_flow/stores/base.rb', line 46 def enqueue_execution(execution_id:, reason:) raise NotImplementedError end |
#load_history(execution_id) ⇒ Object
30 31 32 |
# File 'lib/solid_flow/stores/base.rb', line 30 def load_history(execution_id) raise NotImplementedError end |
#mark_timer_fired(timer_id:) ⇒ Object
66 67 68 |
# File 'lib/solid_flow/stores/base.rb', line 66 def mark_timer_fired(timer_id:) raise NotImplementedError end |
#persist_context(execution_id:, ctx:) ⇒ Object
42 43 44 |
# File 'lib/solid_flow/stores/base.rb', line 42 def persist_context(execution_id:, ctx:) raise NotImplementedError end |
#persist_signal_consumed(execution_id:, signal_name:) ⇒ Object
70 71 72 |
# File 'lib/solid_flow/stores/base.rb', line 70 def persist_signal_consumed(execution_id:, signal_name:) raise NotImplementedError end |
#query_execution(execution_id:, workflow_class:) ⇒ Object
22 23 24 |
# File 'lib/solid_flow/stores/base.rb', line 22 def query_execution(execution_id:, workflow_class:) raise NotImplementedError end |
#record_compensation_failure(execution_id:, step:, compensation_task:, error:) ⇒ Object
82 83 84 |
# File 'lib/solid_flow/stores/base.rb', line 82 def record_compensation_failure(execution_id:, step:, compensation_task:, error:) raise NotImplementedError end |
#record_compensation_result(execution_id:, step:, compensation_task:, result:) ⇒ Object
78 79 80 |
# File 'lib/solid_flow/stores/base.rb', line 78 def record_compensation_result(execution_id:, step:, compensation_task:, result:) raise NotImplementedError end |
#record_task_failure(execution_id:, step:, attempt:, error:, retryable:) ⇒ Object
58 59 60 |
# File 'lib/solid_flow/stores/base.rb', line 58 def record_task_failure(execution_id:, step:, attempt:, error:, retryable:) raise NotImplementedError end |
#record_task_result(execution_id:, step:, result:, attempt:, ctx_snapshot:, idempotency_key:) ⇒ Object
54 55 56 |
# File 'lib/solid_flow/stores/base.rb', line 54 def record_task_result(execution_id:, step:, result:, attempt:, ctx_snapshot:, idempotency_key:) raise NotImplementedError end |
#schedule_compensation(execution_id:, workflow_class:, step:, compensation_task:, context:) ⇒ Object
74 75 76 |
# File 'lib/solid_flow/stores/base.rb', line 74 def schedule_compensation(execution_id:, workflow_class:, step:, compensation_task:, context:) raise NotImplementedError end |
#schedule_task(execution_id:, step:, task:, arguments:, headers:, run_at: nil) ⇒ Object
50 51 52 |
# File 'lib/solid_flow/stores/base.rb', line 50 def schedule_task(execution_id:, step:, task:, arguments:, headers:, run_at: nil) raise NotImplementedError end |
#schedule_timer(execution_id:, step:, run_at:, instruction:, metadata:) ⇒ Object
62 63 64 |
# File 'lib/solid_flow/stores/base.rb', line 62 def schedule_timer(execution_id:, step:, run_at:, instruction:, metadata:) raise NotImplementedError end |
#signal_execution(execution_id:, workflow_class:, signal_name:, payload:) ⇒ Object
18 19 20 |
# File 'lib/solid_flow/stores/base.rb', line 18 def signal_execution(execution_id:, workflow_class:, signal_name:, payload:) raise NotImplementedError end |
#start_execution(workflow_class:, input:, graph_signature:) ⇒ Object
14 15 16 |
# File 'lib/solid_flow/stores/base.rb', line 14 def start_execution(workflow_class:, input:, graph_signature:) raise NotImplementedError end |
#update_execution(execution_id:, attributes:) ⇒ Object
38 39 40 |
# File 'lib/solid_flow/stores/base.rb', line 38 def update_execution(execution_id:, attributes:) raise NotImplementedError end |
#with_execution(execution_id, lock: true) ⇒ Object
26 27 28 |
# File 'lib/solid_flow/stores/base.rb', line 26 def with_execution(execution_id, lock: true) raise NotImplementedError end |