Module: Restate::ObjectSharedContext
- Includes:
- Context
- Included in:
- ObjectContext, WorkflowSharedContext
- Defined in:
- lib/restate/context.rb
Overview
Context interface for VirtualObject shared handlers (read-only state). Extends Context with get, state_keys, and key — but no mutations.
Instance Method Summary collapse
-
#get(name, serde: JsonSerde) ⇒ Object
Durably retrieve a state entry.
-
#get_async(name, serde: JsonSerde) ⇒ Object
Durably retrieve a state entry, returning a DurableFuture instead of blocking.
-
#state_keys ⇒ Object
List all state entry names.
-
#state_keys_async ⇒ Object
List all state entry names, returning a DurableFuture instead of blocking.
Methods included from Context
#awakeable, #cancel_invocation, #generic_call, #generic_send, #key, #object_call, #object_send, #reject_awakeable, #reject_signal, #request, #resolve_awakeable, #resolve_signal, #run, #run_sync, #service_call, #service_send, #signal, #sleep, #wait_any, #workflow_call, #workflow_send
Instance Method Details
#get(name, serde: JsonSerde) ⇒ Object
Durably retrieve a state entry. Returns nil if unset.
170 |
# File 'lib/restate/context.rb', line 170 def get(name, serde: JsonSerde); end |
#get_async(name, serde: JsonSerde) ⇒ Object
Durably retrieve a state entry, returning a DurableFuture instead of blocking.
173 |
# File 'lib/restate/context.rb', line 173 def get_async(name, serde: JsonSerde); end |
#state_keys ⇒ Object
List all state entry names.
176 |
# File 'lib/restate/context.rb', line 176 def state_keys; end |
#state_keys_async ⇒ Object
List all state entry names, returning a DurableFuture instead of blocking.
179 |
# File 'lib/restate/context.rb', line 179 def state_keys_async; end |