hyparview v0.1.4 Hyparview.Messages.Join View Source
JOIN request abstraction module
Link to this section Summary
Functions
Handler function for JOIN request receiver
Asynchronously send a JOIN message to a chosen node at random from contact node
Link to this section Types
Link to this section Functions
Link to this function
handle(join, view0)
View Source
handle(t(), view0 :: Hyparview.View.t()) :: Hyparview.View.t()
Handler function for JOIN request receiver
If the receiver has free slot in its active view, accept the JOIN and propagates FORWARDJOIN message to all node in its active view. and then add the JOIN sender to its active view and send back JOINACCEPTED to the sender.
other than those above, receiver replies a JOINFAILED message.
view = Join.handle(join, state.view) {:noreply, %{state | view: view}}
Asynchronously send a JOIN message to a chosen node at random from contact node.
:ok = Join.send(Join.new(), state.view)
Link to this function
send_after(view, after_msec)
View Source
send_after(Hyparview.View.t(), non_neg_integer()) :: reference()