hyparview v0.1.4 Hyparview.Messages.JoinAccepted View Source
A Message for JOIN accepted
Link to this section Summary
Functions
Handler function for JoinAccepted received node. If the Join request accepted, Join receiver send back a JoinAccepted includes its active view to the Join sender. When the JoinAccepted received, Join sender merge the active_view into its passive_view. Consequently, the probability of connectivity of nodes of its passive_view gets higher
Send to Join Accepted message to Join sender
Link to this section Types
t() :: %Hyparview.Messages.JoinAccepted{ sender: Node.t(), view: Hyparview.View.t() }
Link to this section Functions
handle(t(), Hyparview.View.t()) :: Hyparview.View.t()
Handler function for JoinAccepted received node. If the Join request accepted, Join receiver send back a JoinAccepted includes its active view to the Join sender. When the JoinAccepted received, Join sender merge the active_view into its passive_view. Consequently, the probability of connectivity of nodes of its passive_view gets higher.
view = JoinAccepted.handle(join_accepted, state.view)
{:noreply, %{state | view: view}}
send!(Hyparview.Messages.Join.t(), Hyparview.View.t()) :: :ok
Send to Join Accepted message to Join sender
:ok = JoinAccepted.send!(join, view.state)