partisan_scamp_v2_membership_strategy (partisan v5.0.1)

View Source

Summary

Functions

Returns the tuple {Joiners, Leavers} where Joiners is the list of node specifications that are elements of List but are not in the membership set, and Leavers are the node specifications for the current members that are not elements in List.

Handling incoming protocol message.

Initialize the strategy state. Start with an empty state with only ourselves known.

When a remote node is connected, notify that node to add us. Then, perform forwarding, if necessary.

Leave a node from the cluster.

Periodic protocol maintenance.

Types

t/0

-type t() ::
          #scamp_v2{myself :: partisan:node_spec(),
                    actor :: partisan:actor(),
                    partial_view :: [partisan:node_spec()],
                    in_view :: [partisan:node_spec()],
                    last_message_time :: erlang:timestamp() | undefined}.

Functions

compare(Members, Scamp_v2)

-spec compare(Members :: [partisan:node_spec()], t()) ->
                 {Joiners :: [partisan:node_spec()], Leavers :: [partisan:node_spec()]}.

Returns the tuple {Joiners, Leavers} where Joiners is the list of node specifications that are elements of List but are not in the membership set, and Leavers are the node specifications for the current members that are not elements in List.

handle_message(_, Scamp_v2)

Handling incoming protocol message.

init(Identity)

Initialize the strategy state. Start with an empty state with only ourselves known.

join(Node, NodeState, Scamp_v2)

When a remote node is connected, notify that node to add us. Then, perform forwarding, if necessary.

leave(Node, Scamp_v2)

Leave a node from the cluster.

periodic(Scamp_v2)

Periodic protocol maintenance.

prune(Nodes, Scamp_v2)