Package vinzclortho :: Module consistenthashing :: Class Ring
[hide private]
[frames] | no frames]

Class Ring

source code

object --+
         |
        Ring

Instance Methods [hide private]
 
__init__(self, partitions, node, N)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_walk_cw(self, start)
A generator that iterates all partitions, starting at the partition provided
source code
 
_walk_ccw(self, start)
A generator that iterates all partitions backwards, starting at the partition provided
source code
 
get_node(self, name) source code
 
replicated(self, node) source code
 
_neighbours(self, p) source code
 
_replicated_in(self, p) source code
 
unwanted(self, claim) source code
 
_swap(self, p1, p2)
This swaps owner of p1 and p2
source code
 
fix_constraint(self) source code
 
update_claim(self) source code
 
ok(self) source code
 
update_node(self, node, claim, force=False)
This will set the number of claimed partitions to 'claim' by stealing/giving partitions at random
source code
 
add_node(self, node, claim=None) source code
 
remove_node(self, node) source code
 
key_to_partition(self, key) source code
 
partition_to_node(self, partition) source code
 
preferred(self, key)
Returns tuple of (preferred, fallbacks)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, partitions, node, N)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)