View Source ProcessHub.Strategy.Synchronization.Base protocol (ProcessHub v0.3.2-alpha)
This protocol defines the behavior of a synchronization strategy.
Summary
Functions
Handles the periodic synchronization of the process registry.
Triggered when coordinator is initialized.
Initializes the periodic synchronization of the process registry.
This function is called when a process has been started on the local node, and the information about the process is about to be propagated to other nodes.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
handle_synchronization(strategy, hub_id, remote_data, remote_node)
View Source@spec handle_synchronization(t(), ProcessHub.hub_id(), term(), node()) :: :ok
Handles the periodic synchronization of the process registry.
@spec init( struct(), ProcessHub.hub_id() ) :: any()
Triggered when coordinator is initialized.
Could be used to perform initialization.
@spec init_sync(t(), ProcessHub.hub_id(), [node()]) :: :ok
Initializes the periodic synchronization of the process registry.
@spec propagate( t(), ProcessHub.hub_id(), [ ProcessHub.Handler.ChildrenAdd.PostStartData.t() | ProcessHub.Handler.ChildrenRem.StopHandle.t() ], node(), :add | :rem, keyword() ) :: :ok
This function is called when a process has been started on the local node, and the information about the process is about to be propagated to other nodes.