Search in sources :

Example 11 with ModuleHandle

use of org.folio.okapi.util.ModuleHandle in project okapi by folio-org.

the class DeploymentManager method shutdownR.

private void shutdownR(Iterator<String> it, int count, Handler<ExtendedAsyncResult<Void>> fut) {
    if (!it.hasNext()) {
        if (count != 0) {
            logger.info("All " + count + " modules shut down");
        }
        fut.handle(new Success<>());
    } else {
        DeploymentDescriptor md = list.get(it.next());
        ModuleHandle mh = md.getModuleHandle();
        logger.debug("Shutting down " + md.getSrvcId());
        mh.stop(future -> shutdownR(it, count + 1, fut));
    }
}
Also used : DeploymentDescriptor(org.folio.okapi.bean.DeploymentDescriptor) ModuleHandle(org.folio.okapi.util.ModuleHandle)

Aggregations

ModuleHandle (org.folio.okapi.util.ModuleHandle)11 LaunchDescriptor (org.folio.okapi.bean.LaunchDescriptor)9 Async (io.vertx.ext.unit.Async)8 ProcessModuleHandle (org.folio.okapi.util.ProcessModuleHandle)8 Test (org.junit.Test)8 DeploymentDescriptor (org.folio.okapi.bean.DeploymentDescriptor)3 Timer (com.codahale.metrics.Timer)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 EnvEntry (org.folio.okapi.bean.EnvEntry)1 Success (org.folio.okapi.common.Success)1