Kaffe v1.14.1 Kaffe.PartitionSelector View Source
Link to this section Summary
Functions
Cycle current from 0 to total-1.
Link to this section Functions
Link to this function
md5(key, total) View Source
Link to this function
random(total) View Source
Link to this function
round_robin(current, total) View Source
Cycle current from 0 to total-1.
Examples
iex> Kaffe.PartitionSelector.round_robin(nil, 3) 0
iex> Kaffe.PartitionSelector.round_robin(0, 3) 1
iex> Kaffe.PartitionSelector.round_robin(1, 3) 2
iex> Kaffe.PartitionSelector.round_robin(2, 3) 0