return;
}
// Note that application removed event is not being handled. We probably don't care about
// the downtime of a removed application.
ApplicationEvent appEvent = (ApplicationEvent)event;
ApplicationDowntimeHistory downtimeHistory = getDowntimeHistory(appEvent.getApplicationConfig());
assert downtimeHistory != null;
if(appEvent instanceof ApplicationUpEvent){
// application must have went down earlier
assert downtimeHistory.getDowntimeBegin() != null;
// log the downtime to the db
recordDowntime(appEvent.getApplicationConfig().getApplicationId(),
downtimeHistory.getDowntimeBegin(), appEvent.getTime());
downtimeHistory.applicationCameUp(appEvent.getTime());
}else if(event instanceof ApplicationDownEvent){
downtimeHistory.applicationWentDown(appEvent.getTime());
}
}