コード例 #1
0
 @Deactivate
 public void deactivate() {
   cfgService.unregisterProperties(getClass(), false);
   clusterCommunicator.removeSubscriber(GET_PREVIOUS);
   clusterCommunicator.removeSubscriber(GET_CURRENT);
   messageHandlingExecutor.shutdown();
   log.info("Stopped");
 }
コード例 #2
0
  @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);
  }
コード例 #3
0
 @Deactivate
 public void deactivate() {
   communicationService.removeSubscriber(PACKET_OUT_SUBJECT);
   messageHandlingExecutor.shutdown();
   tracker = null;
   log.info("Stopped");
 }
コード例 #4
0
ファイル: DatabaseManager.java プロジェクト: uni2u/onos
 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
ファイル: DatabaseManager.java プロジェクト: uni2u/onos
 @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");
 }