@Override public void init() { super.init(); }
@Override public void init() { super.init(); }
@Override public void init() { super.init(); LOG.debug("Initialising. Owner is: {}", checkNotNull(getConfig(OWNER), OWNER.getName())); }
@Override protected void addCustoms(RebindContext rebindContext, LocationMemento memento) { setParent(rebindContext, memento); addChildren(rebindContext, memento); location.init(); // TODO deprecated calling init; will be deleted }
@Override public void init() { super.init(); // TODO BasicLocationRebindsupport.addCustoms currently calls init() unfortunately! // Don't checkNotNull in that situation - it could be this location is orphaned! if (isRebinding()) { cluster = (MesosCluster) getConfig(OWNER); } else { cluster = (MesosCluster) checkNotNull(getConfig(OWNER), "owner"); } }
@Override public void init() { super.init(); // TODO BasicLocationRebindsupport.addCustoms currently calls init() unfortunately! // Don't checkNotNull in that situation - it could be this location is orphaned! if (isRebinding()) { infrastructure = (DockerInfrastructure) getConfig(OWNER); } else { infrastructure = (DockerInfrastructure) checkNotNull(getConfig(OWNER), "owner"); addReloadListener(); } }
@Override public void init() { super.init(); // Register any pre-existing port-mappings with the PortForwardManager Map<Integer, String> tcpPortMappings = getConfig(TCP_PORT_MAPPINGS); if (tcpPortMappings != null) { PortForwardManager pfm = (PortForwardManager) getManagementContext().getLocationRegistry().getLocationManaged(PortForwardManagerLocationResolver.PFM_GLOBAL_SPEC); for (Map.Entry<Integer, String> entry : tcpPortMappings.entrySet()) { int targetPort = entry.getKey(); HostAndPort publicEndpoint = HostAndPort.fromString(entry.getValue()); if (!publicEndpoint.hasPort()) { throw new IllegalArgumentException("Invalid portMapping ('"+entry.getValue()+"') for port "+targetPort+" in machine "+this); } pfm.associate(publicEndpoint.getHostText(), publicEndpoint, this, targetPort); } } }
@Override public void init() { super.init(); // Register any pre-existing port-mappings with the PortForwardManager Map<Integer, String> tcpPortMappings = getConfig(TCP_PORT_MAPPINGS); if (tcpPortMappings != null) { PortForwardManager pfm = (PortForwardManager) getManagementContext().getLocationRegistry().getLocationManaged(PortForwardManagerLocationResolver.PFM_GLOBAL_SPEC); for (Map.Entry<Integer, String> entry : tcpPortMappings.entrySet()) { int targetPort = entry.getKey(); HostAndPort publicEndpoint = HostAndPort.fromString(entry.getValue()); if (!publicEndpoint.hasPort()) { throw new IllegalArgumentException("Invalid portMapping ('"+entry.getValue()+"') for port "+targetPort+" in machine "+this); } pfm.associate(publicEndpoint.getHostText(), publicEndpoint, this, targetPort); } } }
@Override public void init() { super.init(); Integer portStartingPoint; Object rawPort = getAllConfigBag().getStringKey(PORT_FORWARD_MANAGER_STARTING_PORT.getName()); if (rawPort != null) { portStartingPoint = getConfig(PORT_FORWARD_MANAGER_STARTING_PORT); } else { portStartingPoint = getManagementContext().getConfig().getConfig(PORT_FORWARD_MANAGER_STARTING_PORT); } portReserved.set(portStartingPoint); log.debug(this+" set initial port to "+portStartingPoint); }
@Override public void init() { super.init();
@Override public void init() { super.init(); // TODO BasicLocationRebindsupport.addCustoms currently calls init() unfortunately! // Don't checkNotNull in that situation - it could be this location is orphaned! if (isRebinding()) { infrastructure = (StubInfrastructure) getConfig(OWNER); } else { infrastructure = (StubInfrastructure) checkNotNull(getConfig(OWNER), "owner"); addReloadListener(); } }
@Override public void init() { super.init(); List<MachineProvisioningLocation<?>> subLocs = MutableList.copyOf(getConfig(SUB_LOCATIONS)); List<LocationSpec<?>> subLocSpecs = getConfig(SUB_LOCATION_SPECS); if (subLocSpecs != null) { for (LocationSpec<?> spec : subLocSpecs) { if (spec.getParent() == null) { // use a copy with us set as parent spec = LocationSpec.create(spec).parent(this); } MachineProvisioningLocation<?> subLoc = (MachineProvisioningLocation<?>) getManagementContext().getLocationManager().createLocation(spec); subLocs.add(subLoc); } } checkState(subLocs.size() >= 1, "sub-locations must not be empty"); config().set(SUB_LOCATIONS, subLocs); config().set(SUB_LOCATION_SPECS, (List<LocationSpec<?>>) null); AvailabilityZoneExtension azExtension = new AvailabilityZoneExtensionImpl(getManagementContext(), subLocs); addExtension(AvailabilityZoneExtension.class, azExtension); }
((LocationInternal)loc).addExtension((Class)entry.getKey(), entry.getValue()); location.init();
@Override public void init() { super.init(); // TODO BasicLocationRebindsupport.addCustoms currently calls init() unfortunately! // Don't checkNotNull in that situation - it could be this location is orphaned! if (isRebinding()) { dockerHost = (StubHost) config().get(OWNER); machine = config().get(MACHINE); } else { dockerHost = (StubHost) checkNotNull(getConfig(OWNER), "owner"); machine = checkNotNull(getConfig(MACHINE), "machine"); addReloadListener(); } }
@Override public void init() { super.init(); // TODO BasicLocationRebindsupport.addCustoms currently calls init() unfortunately! // Don't checkNotNull in that situation - it could be this location is orphaned! if (isRebinding()) { dockerHost = (DockerHost) config().get(OWNER); machine = config().get(MACHINE); portForwarder = config().get(PORT_FORWARDER); jcloudsLocation = config().get(JCLOUDS_LOCATION); } else { dockerHost = (DockerHost) checkNotNull(config().get(OWNER), "owner"); machine = checkNotNull(config().get(MACHINE), "machine"); portForwarder = config().get(PORT_FORWARDER); jcloudsLocation = config().get(JCLOUDS_LOCATION); addReloadListener(); } }