View Source Statestores.Adapters.LookupBehaviour behaviour (spawn_statestores v2.0.0-RC7)

LookupBehaviour defines how system get clustered actors info.

Summary

Callbacks

Delete all records from a specific node.

Retrieves all actohost entries for a specific node.

Fetches all existing entries for a given ActorId.

Fetches all existing entries for a given ActorId for a specific node.

Saves or updates to persistent storage the ActorHost for a given ActorId.

Types

actor_id()

@type actor_id() :: struct()

host()

@type host() :: struct()

Callbacks

clean(node)

@callback clean(node()) :: {:error, any()} | {:ok, any()}

Delete all records from a specific node.

get_all_by_node(node)

@callback get_all_by_node(node()) :: {:ok, any()} | {:error, any()}

Retrieves all actohost entries for a specific node.

get_by_id(actor_id)

@callback get_by_id(actor_id()) :: {:ok, any()} | {:error, any()}

Fetches all existing entries for a given ActorId.

get_by_id_node(actor_id, node)

@callback get_by_id_node(actor_id(), node()) :: {:ok, any()} | {:error, any()}

Fetches all existing entries for a given ActorId for a specific node.

set(actor_id, node, host)

@callback set(actor_id(), node(), host()) :: {:error, any()} | {:ok, any()}

Saves or updates to persistent storage the ActorHost for a given ActorId.