Examples of EqualOwnerPredicate


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

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

   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

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

         // 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
Copyright © 2018 www.massapi.com. 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.