if (runLevelController.getCurrentRunLevel() < StartupRunLevel.VAL - 1 || isShutdown()) {
return;
}
env.setStatus(ServerEnvironment.Status.starting);
events.send(new Event(EventTypes.SERVER_STARTUP), false);
// finally let's calculate our starting times
logger.log(Level.INFO, KernelLoggerInfo.startupEndMessage,
new Object[] { Version.getVersion(), Version.getBuildVersion(), platform,
(platformInitTime - context.getCreationTime()),
(System.currentTimeMillis() - platformInitTime),
System.currentTimeMillis() - context.getCreationTime()});
printModuleStatus(systemRegistry, level);
try {
// it will only be set when called from AsadminMain and the env. variable AS_DEBUG is set to true
long realstart = Long.parseLong(System.getProperty("WALL_CLOCK_START"));
logger.log(Level.INFO, KernelLoggerInfo.startupTotalTime, (System.currentTimeMillis() - realstart));
}
catch(Exception e) {
// do nothing.
}
if (logger.isLoggable(level)) {
for (Map.Entry<Class<?>, Long> service : servicesTiming.entrySet()) {
logger.log(level, "Service : " + service.getKey() + " took " + service.getValue() + " ms");
}
}
for (Future<Result<Thread>> future : futures) {
try {
try {
// wait for an eventual status, otherwise ignore
if (future.get(timeout, unit).isFailure()) {
final Throwable t = future.get().exception();
logger.log(Level.SEVERE, KernelLoggerInfo.startupFatalException, t);
events.send(new Event(EventTypes.SERVER_SHUTDOWN), false);
forceShutdown();
return;
}
} catch(TimeoutException e) {
logger.log(Level.WARNING, KernelLoggerInfo.startupWaitTimeout, e);
}
} catch(Throwable t) {
logger.log(Level.SEVERE, KernelLoggerInfo.startupException, t);
}
}
env.setStatus(ServerEnvironment.Status.started);
events.send(new Event(EventTypes.SERVER_READY), false);
pidWriter.writePidFile();
}