use of io.mantisrx.server.core.Service in project mantis by Netflix.
the class MantisWorker method shutdown.
@Override
public void shutdown() {
logger.info("Shutting down Mantis Worker");
for (Service service : mantisServices) {
service.shutdown();
}
blockUntilShutdown.countDown();
}
use of io.mantisrx.server.core.Service in project mantis by Netflix.
the class MantisWorker method start.
@Override
public void start() {
logger.info("Starting Mantis Worker");
RxNetty.useMetricListenersFactory(new MantisNettyEventsListenerFactory());
for (Service service : mantisServices) {
logger.info("Starting service: " + service.getClass().getName());
try {
service.start();
} catch (Throwable e) {
logger.error(String.format("Failed to start service %s: %s", service, e.getMessage()), e);
throw e;
}
}
try {
blockUntilShutdown.await();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
Aggregations