Behaviours: gen_server.
exchange() = {module(), node(), reference(), pid()}
exchanges() = [exchange()]
nodename() = any()
| broadcast/2 | Broadcasts a message originating from this node. |
| broadcast_members/0 | Returns the broadcast servers view of full cluster membership. |
| broadcast_members/1 | Returns the broadcast servers view of full cluster membership. |
| cancel_exchanges/1 | cancel exchanges started by this node. |
| debug_get_peers/2 | return the peers for Node for the tree rooted at Root. |
| debug_get_peers/3 | return the peers for Node for the tree rooted at Root. |
| debug_get_tree/2 | return peers for all Nodes for tree rooted at Root
Wait indefinitely for a response is returned from the process. |
| exchanges/0 | return a list of exchanges, started by broadcast on thisnode, that are running. |
| exchanges/1 | returns a list of exchanges, started by broadcast on Node, that are running. |
| start_link/0 | Starts the broadcast server on this node. |
| start_link/5 | Starts the broadcast server on this node. |
| update/1 | Notifies broadcast server of membership update. |
broadcast(Broadcast::any(), Mod::module()) -> ok
Broadcasts a message originating from this node. The message will be delivered to
each node at least once. The Mod passed is responsible for handling the message on remote
nodes as well as providing some other information both locally and and on other nodes.
Mod must be loaded on all members of the clusters and implement the
riak_core_broadcast_handler behaviour.
broadcast_members() -> ordsets:ordset(nodename())
Returns the broadcast servers view of full cluster membership. Wait indefinitely for a response is returned from the process
broadcast_members(Timeout::infinity | pos_integer()) -> ordsets:ordset(nodename())
Returns the broadcast servers view of full cluster membership.
Waits Timeout ms for a response from the server
cancel_exchanges(WhichExchanges::all | {peer, node()} | {mod, module()} | reference() | pid()) -> exchanges()
cancel exchanges started by this node.
debug_get_peers(Node::node(), Root::node()) -> {ordsets:ordset(node()), ordsets:ordset(node())}
return the peers for Node for the tree rooted at Root.
Wait indefinitely for a response is returned from the process
debug_get_peers(Node::node(), Root::node(), Timeout::infinity | pos_integer()) -> {ordsets:ordset(node()), ordsets:ordset(node())}
return the peers for Node for the tree rooted at Root.
Waits Timeout ms for a response from the server
debug_get_tree(Root::node(), Nodes::[node()]) -> [{node(), {ordsets:ordset(node()), ordsets:ordset(node())}}]
return peers for all Nodes for tree rooted at Root
Wait indefinitely for a response is returned from the process
exchanges() -> exchanges()
return a list of exchanges, started by broadcast on thisnode, that are running
exchanges(Node::node()) -> exchanges()
returns a list of exchanges, started by broadcast on Node, that are running
start_link() -> {ok, pid()} | ignore | {error, term()}
Starts the broadcast server on this node. The initial membership list is fetched from the ring. If the node is a singleton then the initial eager and lazy sets are empty. If there are two nodes, each will be in the others eager set and the lazy sets will be empty. When number of members is less than 5, each node will initially have one other node in its eager set and lazy set. If there are more than five nodes each node will have at most two other nodes in its eager set and one in its lazy set, initally. In addition, after the broadcast server is started, a callback is registered with ring_events to generate membership updates as the ring changes.
start_link(InitMembers::[nodename()], InitEagers::[nodename()], InitLazys::[nodename()], Mods::[module()], Opts::proplists:proplist()) -> {ok, pid()} | ignore | {error, term()}
Starts the broadcast server on this node. InitMembers must be a list
of all members known to this node when starting the broadcast server.
InitEagers are the initial peers of this node for all broadcast trees.
InitLazys is a list of random peers not in InitEagers that will be used
as the initial lazy peer shared by all trees for this node. If the number
of nodes in the cluster is less than 3, InitLazys should be an empty list.
InitEagers and InitLazys must also be subsets of InitMembers. Mods is
a list of modules that may be handlers for broadcasted messages. All modules in
Mods should implement the plumtree_broadcast_handler behaviour.
Opts is a proplist with the following possible options:
Flush all outstanding lazy pushes period (in milliseconds)
{lazy_tick_period, non_neg_integer()}
Possibly perform an exchange period (in milliseconds)
{exchange_tick_period, non_neg_integer()}
update(LocalState0) -> any()
Notifies broadcast server of membership update
Generated by EDoc