controller.getLoadBalancer().moveAgents(layout);
RestartDestinationLocator locator = controller.getRestartLocator(); MoveHelper mover = controller.getMoveHelper(); locator.setPreferredRestartLocations(layout); for (Iterator it = nodesToVacate.iterator(); it.hasNext();) { String origin = (String)it.next(); Set agentsOnNode = affectedAgents(Collections.singleton(origin)); for (Iterator it1 = agentsOnNode.iterator(); it1.hasNext();) { String agent = (String)it1.next(); String dest = locator.getRestartLocation(agent, excludedNodes); if (logger.isInfoEnabled()) { logger.info("Moving agent:" + " agent=" + agent + " origin=" + origin + " dest=" + dest); } mover.moveAgent(agent, origin, dest, communityName); } }
      public void layoutReady(Map layout) {        controller.getLoadBalancer().moveAgents(layout);      }