IntervalKeyPool

io.shiftleft.passes.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.

Attributes

Graph
Supertypes
trait KeyPool
trait KeyPool
class Object
trait Matchable
class Any

Members list

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

Attributes

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.

Attributes

Concrete fields

val first: Long
val last: Long