Package com.vmware.bdd.dal.impl.IpBlockDAO

Examples of com.vmware.bdd.dal.impl.IpBlockDAO.EqualOwnerPredicate


            "should not be called when IP pool is not used");
      AuAssert.check(
            clusterId != null && !clusterId.equals(IpBlockEntity.FREE_BLOCK_OWNER_ID),
            "ownerId should be valid");

      Predicate<IpBlockEntity> pred = new EqualOwnerPredicate(clusterId);
      List<IpBlockEntity> assignedBlocks = IpBlockEntity.filter(entity.getIpBlocks(),
            pred);
      Collections.sort(assignedBlocks);
      return assignedBlocks;
   }
View Full Code Here


   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);
View Full Code Here

         // DHCP allowed
         return;
      }
      logger.info("free all request: cluster " + clusterId);

      Predicate<IpBlockEntity> pred = new EqualOwnerPredicate(clusterId);
      List<IpBlockEntity> toBeFreed = IpBlockEntity.filter(entity.getIpBlocks(), pred);

      if (!toBeFreed.isEmpty()) {
         // call dup to clear their Hibernate-status
         this.free(entity, clusterId, IpBlockEntity.dup(toBeFreed));
View Full Code Here

TOP

Related Classes of com.vmware.bdd.dal.impl.IpBlockDAO.EqualOwnerPredicate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.