public virtual ApplicationState Transition(ApplicationImpl app, ApplicationEvent @event) { ApplicationContainerFinishedEvent containerFinishEvent = (ApplicationContainerFinishedEvent )@event; Log.Info("Removing " + containerFinishEvent.GetContainerID() + " from application " + app.ToString()); Sharpen.Collections.Remove(app.containers, containerFinishEvent.GetContainerID()); if (app.containers.IsEmpty()) { // All containers are cleanedup. app.HandleAppFinishWithContainersCleanedup(); return(ApplicationState.ApplicationResourcesCleaningup); } return(ApplicationState.FinishingContainersWait); }
public void Transition(ApplicationImpl app, ApplicationEvent @event) { ApplicationContainerFinishedEvent containerEvent = (ApplicationContainerFinishedEvent )@event; if (null == Sharpen.Collections.Remove(app.containers, containerEvent.GetContainerID ())) { Log.Warn("Removing unknown " + containerEvent.GetContainerID() + " from application " + app.ToString()); } else { Log.Info("Removing " + containerEvent.GetContainerID() + " from application " + app .ToString()); } }