key() = term()
node_entry() = term()
nodes() = [node_entry()]
num_vnodes() = pos_integer()
abstract datatype: ring()
add/2 | Adds a node (and its virtual nodes) to the ring. |
contains/2 | Returns true if the given node is present in the ring, otherwise false. |
lookup/2 | Returns the node associated with the given key. |
members/1 | Returns the ordered list of nodes in the ring. |
new/1 | Creates a new ring without virtual nodes. |
new/2 | Creates a new ring with NumVNodes of virtual nodes. |
remove/2 | Removes the given node (and its virtual nodes) from the ring if the node is present in the ring, otherwise does nothing. |
size/1 | Returns the number of nodes (including virtual nodes) in the ring. |
add(Node::node_entry(), Ring::ring()) -> ring()
Adds a node (and its virtual nodes) to the ring. Returns the new ring.
contains(Node::node_entry(), Ring::ring()) -> boolean()
Returns true if the given node is present in the ring, otherwise false.
lookup(Key::key(), Ring::ring()) -> node_entry() | {error, empty_ring}
Returns the node associated with the given key. Returns an error if the ring is empty.
Returns the ordered list of nodes in the ring.
Creates a new ring without virtual nodes.
new(NumVNodes::num_vnodes(), Nodes::nodes()) -> ring()
Creates a new ring with NumVNodes
of virtual nodes.
remove(Node::node_entry(), Ring::ring()) -> ring()
Removes the given node (and its virtual nodes) from the ring if the node is present in the ring, otherwise does nothing. Returns the new ring.
size(Ring::ring()) -> non_neg_integer()
Returns the number of nodes (including virtual nodes) in the ring.
Generated by EDoc, Sep 2 2016, 15:19:14.