diff options
Diffstat (limited to 'src/mem3_server.erl')
-rw-r--r-- | src/mem3_server.erl | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/mem3_server.erl b/src/mem3_server.erl index addcb591..0d76344d 100644 --- a/src/mem3_server.erl +++ b/src/mem3_server.erl @@ -20,7 +20,7 @@ %% API -export([start_link/0, start_link/1, stop/0, stop/1, reset/0]). --export([join/3, clock/0, state/0, states/0, nodes/0, fullnodes/0, +-export([join/3, clock/0, state/0, nodes/0, fullnodes/0, start_gossip/0]). %% for testing more than anything else @@ -76,22 +76,6 @@ clock() -> state() -> gen_server:call(?SERVER, state). - -%% @doc Detailed report of cluster-wide membership state. Queries the state -%% on all member nodes and builds a dictionary with unique states as the -%% key and the nodes holding that state as the value. Also reports member -%% nodes which fail to respond and nodes which are connected but are not -%% cluster members. Useful for debugging. --spec states() -> [{mem_state() | bad_nodes | non_member_nodes, [node()]}]. -states() -> - {ok, Nodes} = mem3:nodes(), - AllNodes = [node()|erlang:nodes()], - {Replies, BadNodes} = gen_server:multi_call(Nodes, ?SERVER, state), - Dict = lists:foldl(fun({Node, {ok,State}}, D) -> - orddict:append(State, Node, D) - end, orddict:new(), Replies), - [{non_member_nodes, AllNodes -- Nodes}, {bad_nodes, BadNodes} | Dict]. - -spec start_gossip() -> ok. start_gossip() -> gen_server:call(?SERVER, start_gossip). |