Package dev.restate.sdk
Interface ObjectContext
- All Superinterfaces:
Context,SharedObjectContext
- All Known Subinterfaces:
WorkflowContext
This interface can be used only within exclusive handlers of virtual objects. It extends
Context adding access to the virtual object instance key-value state storage.
NOTE: This interface MUST NOT be accessed concurrently since it can lead to different orderings of user actions, corrupting the execution of the invocation.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidClears the state stored under key.voidclearAll()Clears all the state of this virtual object instance key-value state storage<T> voidMethods inherited from interface dev.restate.sdk.Context
awakeable, awakeable, awakeableHandle, call, invocationHandle, invocationHandle, invocationHandle, random, request, run, run, run, run, run, run, run, run, run, runAsync, runAsync, runAsync, runAsync, runAsync, runAsync, runAsync, runAsync, runAsync, send, send, sleep, timer, timerMethods inherited from interface dev.restate.sdk.SharedObjectContext
get, key, stateKeys
-
Method Details
-
clear
Clears the state stored under key.- Parameters:
key- identifying the state to clear.
-
clearAll
void clearAll()Clears all the state of this virtual object instance key-value state storage -
set
- Parameters:
key- identifying the value to store and its type.value- to store under the given key. MUST NOT be null.
-