Class: Plutonium::Wizard::Store::Base
- Inherits:
-
Object
- Object
- Plutonium::Wizard::Store::Base
- Defined in:
- lib/plutonium/wizard/store/base.rb
Overview
Storage port for wizard sessions. Adapters exchange Plutonium::Wizard::State value objects and are keyed by the derived InstanceKey digest.
Direct Known Subclasses
Instance Method Summary collapse
-
#clear(instance_key) ⇒ Object
Delete the row.
-
#complete(instance_key) ⇒ Object
Mark completed: status "completed", stamp completed_at, null data/persisted.
-
#completed?(instance_key:) ⇒ Boolean
One-time completion check (§4.3 / §9): does a
completedrow exist at this instance_key? Identity is the digest, so the caller recomputes the wizard's instance_key (concurrency_key + folded tenant) and asks here. - #read(instance_key) ⇒ State?
-
#write(instance_key, state, cleanup_after:) ⇒ State
Upsert by
instance_key.
Instance Method Details
#clear(instance_key) ⇒ Object
Delete the row.
30 |
# File 'lib/plutonium/wizard/store/base.rb', line 30 def clear(instance_key) = raise NotImplementedError |
#complete(instance_key) ⇒ Object
Mark completed: status "completed", stamp completed_at, null data/persisted.
25 |
# File 'lib/plutonium/wizard/store/base.rb', line 25 def complete(instance_key) = raise NotImplementedError |
#completed?(instance_key:) ⇒ Boolean
One-time completion check (§4.3 / §9): does a completed row exist at
this instance_key? Identity is the digest, so the caller recomputes the
wizard's instance_key (concurrency_key + folded tenant) and asks here.
38 |
# File 'lib/plutonium/wizard/store/base.rb', line 38 def completed?(instance_key:) = raise NotImplementedError |
#read(instance_key) ⇒ State?
11 |
# File 'lib/plutonium/wizard/store/base.rb', line 11 def read(instance_key) = raise NotImplementedError |
#write(instance_key, state, cleanup_after:) ⇒ State
Upsert by instance_key. Stamps +expires_at = now + cleanup_after+
(nil cleanup_after → null expiry).
20 |
# File 'lib/plutonium/wizard/store/base.rb', line 20 def write(instance_key, state, cleanup_after:) = raise NotImplementedError |