@Deactivate
 public void deactivate() {
   cfgService.unregisterProperties(getClass(), false);
   clusterCommunicator.removeSubscriber(GET_PREVIOUS);
   clusterCommunicator.removeSubscriber(GET_CURRENT);
   messageHandlingExecutor.shutdown();
   log.info("Stopped");
 }
  @Override
  public CompletableFuture<Void> destroy() {
    destroyed = true;

    executor.shutdown();
    backgroundExecutor.shutdown();
    communicationExecutor.shutdown();

    listeners.clear();

    clusterCommunicator.removeSubscriber(updateMessageSubject);
    clusterCommunicator.removeSubscriber(updateRequestSubject);
    clusterCommunicator.removeSubscriber(antiEntropyAdvertisementSubject);
    return CompletableFuture.completedFuture(null);
  }
 @Deactivate
 public void deactivate() {
   communicationService.removeSubscriber(PACKET_OUT_SUBJECT);
   messageHandlingExecutor.shutdown();
   tracker = null;
   log.info("Stopped");
 }
Пример #4
0
 protected <K, V> void unregisterMap(DefaultAsyncConsistentMap<K, V> map) {
   if (maps.remove(map.name()) != null) {
     clusterCommunicator.removeSubscriber(mapUpdatesSubject(map.name()));
   }
   if (map.applicationId() != null) {
     mapsByApplication.remove(map.applicationId(), map);
   }
 }
Пример #5
0
 private void unregisterMessageHandlers() {
   clusterCommunicator.removeSubscriber(REMOVE_FLOW_ENTRY);
   clusterCommunicator.removeSubscriber(GET_DEVICE_FLOW_ENTRIES);
   clusterCommunicator.removeSubscriber(GET_FLOW_ENTRY);
   clusterCommunicator.removeSubscriber(APPLY_BATCH_FLOWS);
   clusterCommunicator.removeSubscriber(REMOTE_APPLY_COMPLETED);
   clusterCommunicator.removeSubscriber(FLOW_TABLE_BACKUP);
 }
Пример #6
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");
 }