Adds the application instances to the applications for the account.
@param applicationInstances The application instances to add
420452
public void addApplicationInstances(Collection<ApplicationInstance> applicationInstances)
    {
        for(ApplicationInstance applicationInstance : applicationInstances)
        {
            // Add the instance to any application hosts it is associated with
            long applicationHostId = applicationInstance.getLinks().getApplicationHost();
            ApplicationHost applicationHost = applicationHosts.get(applicationHostId);
            if(applicationHost != null)
                applicationInstances(applicationHostId).add(applicationInstance);
            else
                logger.severe(String.format("Unable to find application host for application instance '%s': %d", applicationInstance.getName(), applicationHostId));
        }
    }
1023924
public void add(Collection<ApplicationHost> applicationHosts)
    {
        for(ApplicationHost applicationHost : applicationHosts)
            this.applicationHosts.put(applicationHost.getId(), applicationHost);
    }
509691
public void setReplicationInstances(java.util.Collection<ReplicationInstance> replicationInstances) {
        if (replicationInstances == null) {
            this.replicationInstances = null;
            return;
        }

        this.replicationInstances = new java.util.ArrayList<ReplicationInstance>(replicationInstances);
    }
311960
private void addAppConfigurations(Collection<I_CmsWorkplaceAppConfiguration> appConfigs) {

        for (I_CmsWorkplaceAppConfiguration appConfig : appConfigs) {
            I_CmsWorkplaceAppConfiguration old = m_appsById.get(appConfig.getId());
            if ((old == null) || (old.getPriority() < appConfig.getPriority())) {
                m_appsById.put(appConfig.getId(), appConfig);
            }
        }
    }
1170594
public void setNotebookInstances(java.util.Collection<NotebookInstanceSummary> notebookInstances) {
        if (notebookInstances == null) {
            this.notebookInstances = null;
            return;
        }

        this.notebookInstances = new java.util.ArrayList<NotebookInstanceSummary>(notebookInstances);
    }
1130617
public void addToApplications(final Application application) {
		if (null == getApplications()) {
			setApplications(new java.util.TreeSet<Application>());
		}
		getApplications().add(application);
	}
1152316
@Override
    public void initializeApplication(ApplicationDefinition oldAppDef,
                                      ApplicationDefinition appDef) {
        checkServiceState();
        OLAPService.instance().initializeApplication(oldAppDef, appDef);
    }
359519
public void setInstanceNames(java.util.Collection<String> instanceNames) {
        if (instanceNames == null) {
            this.instanceNames = null;
            return;
        }

        this.instanceNames = new com.amazonaws.internal.SdkInternalList<String>(instanceNames);
    }
438259
@Override
	public List<Instance> listChildrenInstances( String applicationName, String instancePath, boolean allChildren ) {

		List<Instance> result = new ArrayList<> ();
		Application app = this.manager.applicationMngr().findApplicationByName( applicationName );

		// Log
		if( instancePath == null )
			this.logger.fine( "Request: list " + (allChildren ? "all" : "root") + " instances for " + applicationName + "." );
		else
			this.logger.fine( "Request: list " + (allChildren ? "all" : "direct") + " children instances for " + instancePath + " in " + applicationName + "." );

		// Find the instances
		Instance inst;
		if( app != null ) {
			if( instancePath == null ) {
				if( allChildren )
					result.addAll( InstanceHelpers.getAllInstances( app ));
				else
					result.addAll( app.getRootInstances());
			}

			else if(( inst = InstanceHelpers.findInstanceByPath( app, instancePath )) != null ) {
				if( allChildren ) {
					result.addAll( InstanceHelpers.buildHierarchicalList( inst ));
					result.remove( inst );
				} else {
					result.addAll( inst.getChildren());
				}
			}
		}

		// Bug #64: sort instance paths for the clients
		Collections.sort( result, new InstanceComparator());
		return result;
	}
748846
public void setInstanceProfileList(java.util.Collection<InstanceProfile> instanceProfileList) {
        if (instanceProfileList == null) {
            this.instanceProfileList = null;
            return;
        }

        this.instanceProfileList = new com.amazonaws.internal.SdkInternalList<InstanceProfile>(instanceProfileList);
    }
1136832
public void setSimulationApplications(java.util.Collection<SimulationApplicationConfig> simulationApplications) {
        if (simulationApplications == null) {
            this.simulationApplications = null;
            return;
        }

        this.simulationApplications = new java.util.ArrayList<SimulationApplicationConfig>(simulationApplications);
    }
1278801
func ApplicationInstances(st *State, application string) ([]instance.Id, error) {
	units, err := allUnits(st, application)
	if err != nil {
		return nil, err
	}
	instanceIds := make([]instance.Id, 0, len(units))
	for _, unit := range units {
		machineId, err := unit.AssignedMachineId()
		if errors.IsNotAssigned(err) {
			continue
		} else if err != nil {
			return nil, err
		}
		machine, err := st.Machine(machineId)
		if err != nil {
			return nil, err
		}
		instanceId, err := machine.InstanceId()
		if err == nil {
			instanceIds = append(instanceIds, instanceId)
		} else if errors.IsNotProvisioned(err) {
			continue
		} else {
			return nil, err
		}
	}
	return instanceIds, nil
}
925324
public void setInstanceGroups(java.util.Collection<InstanceGroupDetail> instanceGroups) {
        if (instanceGroups == null) {
            this.instanceGroups = null;
            return;
        }

        this.instanceGroups = new com.amazonaws.internal.SdkInternalList<InstanceGroupDetail>(instanceGroups);
    }
396546
void addRequest(final InstanceType instanceType, final int numberOfInstances) {

		Integer numberOfRemainingInstances = this.pendingRequests.get(instanceType);
		if (numberOfRemainingInstances == null) {
			numberOfRemainingInstances = Integer.valueOf(numberOfInstances);
		} else {
			numberOfRemainingInstances = Integer.valueOf(numberOfRemainingInstances.intValue() + numberOfInstances);
		}

		this.pendingRequests.put(instanceType, numberOfRemainingInstances);
	}
88509
public void setApplications(java.util.Collection<ApplicationSummary> applications) {
        if (applications == null) {
            this.applications = null;
            return;
        }

        this.applications = new java.util.ArrayList<ApplicationSummary>(applications);
    }
38951
public void setBrokerInstances(java.util.Collection<BrokerInstance> brokerInstances) {
        if (brokerInstances == null) {
            this.brokerInstances = null;
            return;
        }

        this.brokerInstances = new java.util.ArrayList<BrokerInstance>(brokerInstances);
    }
164340
public void setReservedDBInstances(java.util.Collection<ReservedDBInstance> reservedDBInstances) {
        if (reservedDBInstances == null) {
            this.reservedDBInstances = null;
            return;
        }

        this.reservedDBInstances = new com.amazonaws.internal.SdkInternalList<ReservedDBInstance>(reservedDBInstances);
    }