Exemplo n.º 1
0
 @Deactivate
 public void deactivate() {
   CompletableFuture.allOf(inMemoryDatabase.close(), partitionedDatabase.close())
       .thenCompose(v -> coordinator.close())
       .whenComplete(
           (result, error) -> {
             if (error != null) {
               log.warn("Failed to cleanly close databases.", error);
             } else {
               log.info("Successfully closed databases.");
             }
           });
   clusterCommunicator.removeSubscriber(QUEUE_UPDATED_TOPIC);
   maps.values().forEach(this::unregisterMap);
   if (applicationService != null) {
     applicationService.removeListener(appListener);
   }
   eventDispatcher.shutdown();
   queuePollExecutor.shutdown();
   log.info("Stopped");
 }
Exemplo n.º 2
0
 protected void unbindApplicationService(ApplicationService service) {
   applicationService.removeListener(appListener);
   this.applicationService = null;
 }
Exemplo n.º 3
0
 protected void bindApplicationService(ApplicationService service) {
   applicationService = service;
   applicationService.addListener(appListener);
 }