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, #request, #resolve_awakeable, #run, #run_sync, #service_call, #service_send, #sleep, #wait_any, #workflow_call, #workflow_send
Instance Method Details
#get(name, serde: JsonSerde) ⇒ Object
Durably retrieve a state entry. Returns nil if unset.
158 |
# File 'lib/restate/context.rb', line 158 def get(name, serde: JsonSerde); end |
#get_async(name, serde: JsonSerde) ⇒ Object
Durably retrieve a state entry, returning a DurableFuture instead of blocking.
161 |
# File 'lib/restate/context.rb', line 161 def get_async(name, serde: JsonSerde); end |
#state_keys ⇒ Object
List all state entry names.
164 |
# File 'lib/restate/context.rb', line 164 def state_keys; end |
#state_keys_async ⇒ Object
List all state entry names, returning a DurableFuture instead of blocking.
167 |
# File 'lib/restate/context.rb', line 167 def state_keys_async; end |