/** * Private constructor to construct a pool with a given set of free ranges and a network which was just allocated. * * @param range range from within to allocate * @param allocationSubnetSize size of the subnets that will be allocated * @param freeRanges free ranges in the allocatable IP address range */ private IPv6AddressPool(final IPv6AddressRange range, final IPv6NetworkMask allocationSubnetSize, final SortedSet<IPv6AddressRange> freeRanges, final IPv6Network lastAllocated) { this.underlyingRange = range; this.allocationSubnetSize = allocationSubnetSize; this.freeRanges = Collections.unmodifiableSortedSet(freeRanges); this.lastAllocated = lastAllocated; validateFreeRanges(underlyingRange, freeRanges); validateRangeIsMultipleOfSubnetsOfGivenSize(underlyingRange, allocationSubnetSize); }
/** * Private constructor to construct a pool with a given set of free ranges and a network which was just allocated. * * @param range range from within to allocate * @param allocationSubnetSize size of the subnets that will be allocated * @param freeRanges free ranges in the allocatable IP address range */ private IPv6AddressPool(final IPv6AddressRange range, final IPv6NetworkMask allocationSubnetSize, final SortedSet<IPv6AddressRange> freeRanges, final IPv6Network lastAllocated) { this.underlyingRange = range; this.allocationSubnetSize = allocationSubnetSize; this.freeRanges = Collections.unmodifiableSortedSet(freeRanges); this.lastAllocated = lastAllocated; validateFreeRanges(underlyingRange, freeRanges); validateRangeIsMultipleOfSubnetsOfGivenSize(underlyingRange, allocationSubnetSize); }