@Test public void testClose() throws Exception { instance.initialize(); Mockito.verify(clusterSingletonService).registerClusterSingletonService(instance); instance.close(); Mockito.verify(clusterSingletonRegistration).close(); }
@Override public void close() throws Exception { LOG.info("Clustering provider closed for {}", this.getClass().getSimpleName()); if (singletonServiceRegistration != null) { try { singletonServiceRegistration.close(); } catch (Exception e) { LOG.warn("{} closed unexpectedly. Cause: {}", e.getMessage()); } singletonServiceRegistration = null; } }
SxpIseAdapterProviderInstance implements ClusterSingletonService, AutoCloseable { @Override public void close() throws Exception { LOG.info("Clustering provider closed for {}", this.getClass().getSimpleName()); if (singletonServiceRegistration != null) { try { singletonServiceRegistration.close(); } catch (Exception e) { LOG.warn("{} closed unexpectedly. Cause: {}", e.getMessage()); } singletonServiceRegistration = null; } } }
SxpIseAdapterProviderInstance implements ClusterSingletonService, AutoCloseable { @Override public void close() throws Exception { LOG.info("Clustering provider closed for {}", this.getClass().getSimpleName()); if (singletonServiceRegistration != null) { try { singletonServiceRegistration.close(); } catch (Exception e) { LOG.warn("{} closed unexpectedly. Cause: {}", e.getMessage()); } singletonServiceRegistration = null; } } SxpIseAdapterProviderInstance(final DataBroker dataBroker,
                                         final BindingAwareBroker bindingAwareBroker,
                                         final ClusterSingletonServiceProvider clusterSingletonService,
                                         final SxpEpProviderProvider sxpEpProvider); }
SxpIseAdapterProviderInstance implements ClusterSingletonService, AutoCloseable { @Override public void close() throws Exception { LOG.info("Clustering provider closed for {}", this.getClass().getSimpleName()); if (singletonServiceRegistration != null) { try { singletonServiceRegistration.close(); } catch (Exception e) { LOG.warn("{} closed unexpectedly. Cause: {}", e.getMessage()); } singletonServiceRegistration = null; } } SxpIseAdapterProviderInstance(final DataBroker dataBroker,
                                         final BindingAwareBroker bindingAwareBroker,
                                         final ClusterSingletonServiceProvider clusterSingletonService,
                                         final SxpEpProviderProvider sxpEpProvider); void initialize(); @Override void instantiateServiceInstance(); @Override ListenableFuture<Void> closeServiceInstance(); @Override void close(); @Override ServiceGroupIdentifier getIdentifier(); }
SxpIseAdapterProviderInstance implements ClusterSingletonService, AutoCloseable { @Override public void close() throws Exception { LOG.info("Clustering provider closed for {}", this.getClass().getSimpleName()); if (singletonServiceRegistration != null) { try { singletonServiceRegistration.close(); } catch (Exception e) { LOG.warn("{} closed unexpectedly. Cause: {}", e.getMessage()); } singletonServiceRegistration = null; } } SxpIseAdapterProviderInstance(final DataBroker dataBroker,
                                         final BindingAwareBroker bindingAwareBroker,
                                         final ClusterSingletonServiceProvider clusterSingletonService,
                                         final SxpEpProviderProvider sxpEpProvider); void initialize(); @Override void instantiateServiceInstance(); @Override ListenableFuture<Void> closeServiceInstance(); @Override void close(); @Override ServiceGroupIdentifier getIdentifier();  }