public void free(NetworkEntity entity, long clusterId, List<IpBlockEntity> ipBlocks) {
AuAssert.check(entity.getAllocType() == AllocType.IP_POOL,
"should not be called when IP pool is not used");
logger.info("free request: cluster " + clusterId + ", IPs " + ipBlocks);
Predicate<IpBlockEntity> predEqOwner = new EqualOwnerPredicate(clusterId);
Predicate<IpBlockEntity> predNotEqOwner = Functor.negate(new EqualOwnerPredicate(
clusterId));
if (ConfigInfo.isDebugEnabled()) {
AuAssert.check(IpBlockEntity.filter(ipBlocks, predNotEqOwner).isEmpty(),
"blocks owner field should match cluster id: " + clusterId);