View Source Spawn.Cluster.StateHandoff.ControllerBehaviour behaviour (spawn v1.1.0)
Behavior for managing the state of clustered processes a.k.a lookups.
Summary
Callbacks
Cleanup action.
Fetch the ActorHost process reference by id.
In case id
is the hash of the ActorId but here the struct ActorId is passed as a parameter.
An implementations must handle this.
Any procedure to be executed after the StateHandoffManager is initialized. Executed during callback call to handle_continue.
Any initialization code required by implementations of this behavior. Must return the state to be added in the StateHandoffManager.
If necessary any procedure to be executed during a nodedown event
If necessary any procedure to be executed during a nodeup event
Perform any necessary cleanups during StateHandoffManager termination. Generally excluding references to all processes owned by the terminating node.
Adds a reference to an ActorHost process.
Types
@type data() :: any()
@type host() :: Actors.Registry.HostActor.t()
@type hosts() :: [Actors.Registry.HostActor.t()]
@type id() :: Eigr.Functions.Protocol.Actors.ActorId.t()
@type new_data() :: data()
@type node_type() :: term()
@type opts() :: Keyword.t()
Callbacks
Cleanup action.
Fetch the ActorHost process reference by id.
In case id
is the hash of the ActorId but here the struct ActorId is passed as a parameter.
An implementations must handle this.
Any procedure to be executed after the StateHandoffManager is initialized. Executed during callback call to handle_continue.
Any initialization code required by implementations of this behavior. Must return the state to be added in the StateHandoffManager.
If necessary any procedure to be executed during a nodedown event
If necessary any procedure to be executed during a nodeup event
Perform any necessary cleanups during StateHandoffManager termination. Generally excluding references to all processes owned by the terminating node.
Adds a reference to an ActorHost process.