private void flexibleRRpolicy ( PackingPlanBuilder planBuilder , String componentName ) throws ResourceExceededException { // If there is not enough space on containerId look at other containers in a RR fashion // starting from containerId. ContainerIdScorer scorer = new ContainerIdScorer ( this . containerId , this . numContainers ) ; this . containerId = nextContainerId ( planBuilder . addInstance ( scorer , componentName ) ) ; }
Performs a RR placement . Tries to place the instance on any container with space starting at containerId and cycling through the container set until it can be placed .