@Override public String addRegion(String location) { Preconditions.checkNotNull(location, "location"); Location l = getManagementContext().getLocationRegistry().getLocationManaged(location); addLocations(Arrays.asList(l)); Entity e = addCluster(l); ((EntityInternal)e).addLocations(Arrays.asList(l)); if (e instanceof Startable) { Task<?> task = e.invoke(Startable.START, ImmutableMap.of("locations", ImmutableList.of(l))); task.getUnchecked(); } return e.getId(); }
it = locations.get(0); ((EntityInternal)child).addLocations(Arrays.asList(it));
Entity e = addCluster(it); ((EntityInternal)e).addLocations(Arrays.asList(it)); if (e instanceof Startable) { Task<?> task = Entities.submit(this,
Class<? extends Location> locationClazz = (Class<? extends Location>) new ClassLoaderUtils(reflections.getClassLoader(), mgmt()).loadClass(locationTypeWithBundlePrefix); Location loc = mgmt().getLocationManager().createLocation(LocationSpec.create(locationClazz)); ((EntityInternal)entity).addLocations(ImmutableList.of(loc));
entity().addLocations(ImmutableList.of((Location) machine));