this.factory = new RunnerFactory(shutdownKey);
}
@Override
public void run(final String[] args) {
final Runner runner = createRunner(args);
final Stopwatch stopwatch = Stopwatch.createStarted();
runner.run();
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
runner.stop();
stopwatch.stop();
logger.info("Total time: " + stopwatch);
}
});
}