View Source
Actors.Actor.StateManager
(spawn v1.2.0)
StateManager
Implements behavior that allows an Actor's state to be saved
to persistent storage using database drivers.
Functions
@spec load(Eigr.Functions.Protocol.Actors.ActorId.t()) :: {:ok, any()}
@spec load(Eigr.Functions.Protocol.Actors.ActorId.t(), number()) :: {:ok, any()}
@spec load_all(Eigr.Functions.Protocol.Actors.ActorId.t()) ::
{:ok, term()} | :not_found | {:error, term()}
@spec load_by_interval(
Eigr.Functions.Protocol.Actors.ActorId.t(),
String.t(),
String.t()
) ::
{:ok, term()} | :not_found | {:error, term()}
@spec save(
Eigr.Functions.Protocol.Actors.ActorId.t(),
Eigr.Functions.Protocol.Actors.ActorState.t(),
Keyword.t()
) ::
{:ok, Eigr.Functions.Protocol.Actors.ActorState.t()}
| {:error, any(), Eigr.Functions.Protocol.Actors.ActorState.t()}
@spec save_async(
Eigr.Functions.Protocol.Actors.ActorId.t(),
Eigr.Functions.Protocol.Actors.ActorState.t(),
Keyword.t()
) ::
{:ok, Eigr.Functions.Protocol.Actors.ActorState.t()}
| {:error, any(), Eigr.Functions.Protocol.Actors.ActorState.t()}