Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Pool<T>

Represents a collection of IP RangedSet's

Type parameters

Hierarchy

  • Pool

Index

Constructors

constructor

Properties

Private backingSet

backingSet: SortedSet = new SortedSet()

Methods

add

aggregate

  • aggregate(): Pool<T>

clear

  • clear(): void

getMultipleCidrRanges

getRanges

getSingleCidrRange

  • Gets a single range of size of the given prefix from pool. Only returns a range if there is a single range in the pool of same size or greater than given prefix.

    throws exception if the requested range cannot be got from the pool.

    Parameters

    Returns IPv4CidrRange | IPv6CidrRange

getSize

  • getSize(): BigInteger
  • Returns the size of IP numbers in the pool

    Returns BigInteger

removeExact

  • Removes the given range from the pool. It is a Noop, if the given range does not exist in the pool

    Parameters

    Returns void

removeOverlapping

resetWith

  • Empties the pool and fill it with given ranges

    Parameters

    • ipRanges: Array<RangedSet<IPv4 | IPv6>>

      the range to fill the pool with after emptying

    Returns void

Static fromCidrRanges

Static fromIPNumbers

Static fromRangeSet

Generated using TypeDoc