Adds a node to the node ring.
Adds a node to the node ring. Note that the instance is immutable and this operation returns a new instance.
Removes a node from the node ring.
Removes a node from the node ring. Note that the instance is immutable and this operation returns a new instance.
Java API: Adds a node to the node ring.
Java API: Adds a node to the node ring. Note that the instance is immutable and this operation returns a new instance.
Is the node ring empty, i.e.
Is the node ring empty, i.e. no nodes added or all removed.
Get the node responsible for the data key.
Get the node responsible for the data key.
Can only be used if nodes exists in the node ring,
otherwise throws IllegalStateException
Get the node responsible for the data key.
Get the node responsible for the data key.
Can only be used if nodes exists in the node ring,
otherwise throws IllegalStateException
Java API: Removes a node from the node ring.
Java API: Removes a node from the node ring. Note that the instance is immutable and this operation returns a new instance.
Consistent Hashing node ring implementation.
A good explanation of Consistent Hashing: http://weblogs.java.net/blog/tomwhite/archive/2007/11/consistent_hash.html
Note that toString of the ring nodes are used for the node hash, i.e. make sure it is different for different nodes.