IntervalKeyPool

class IntervalKeyPool(val first: Long, val last: Long) extends KeyPool

A key pool that returns the integers of the interval [first, last] in a thread-safe manner.

trait KeyPool
trait KeyPool
class Object
trait Matchable
class Any

Value members

Concrete methods

def next: Long

Get next number in interval or raise if number is larger than last

Get next number in interval or raise if number is larger than last

def split(numberOfPartitions: Int): Iterator[IntervalKeyPool]

Split key pool into numberOfPartitions partitions of mostly equal size. Invalidates the current pool to ensure that the user does not continue to use both the original pool and pools derived from it via split.

Split key pool into numberOfPartitions partitions of mostly equal size. Invalidates the current pool to ensure that the user does not continue to use both the original pool and pools derived from it via split.

Concrete fields

val first: Long
val last: Long