Interface IObjectContext
- Namespace
- Restate.Sdk
- Assembly
- Restate.Sdk.dll
Interface for exclusive handlers on virtual objects. Provides read-write state access. Only one exclusive handler runs at a time per key.
public interface IObjectContext : ISharedObjectContext, IContext
- Inherited Members
Methods
Clear(string)
Clears a single state key.
void Clear(string key)
Parameters
keystring
Clear(string, string?)
Clears a single state key, labelling the journal entry with
entryName. The name is observability only.
void Clear(string key, string? entryName)
Parameters
ClearAll()
Clears all state keys for this virtual object instance.
void ClearAll()
ClearAll(string?)
Clears all state keys for this virtual object instance, labelling the journal entry
with entryName. The name is observability only.
void ClearAll(string? entryName)
Parameters
entryNamestring
Set<T>(StateKey<T>, T)
Sets the value for the given state key.
void Set<T>(StateKey<T> key, T value)
Parameters
keyStateKey<T>valueT
Type Parameters
T
Set<T>(StateKey<T>, T, string?)
Sets the value for the given state key, labelling the journal entry with
entryName so it reads as that name in the Restate UI. The name is
observability only: it does not change what is written, and omitting it records the
same entry as Set<T>(StateKey<T>, T).
void Set<T>(StateKey<T> key, T value, string? entryName)
Parameters
Type Parameters
T