@Test public void testCloseServiceInstance_null() throws Exception { final ListenableFuture<Void> future = instance.closeServiceInstance(); Assert.assertTrue(future.isDone()); Assert.assertNull(future.get()); }
@Override public ListenableFuture<Void> closeServiceInstance() { LOG.info("Instance {} closed", this.getClass().getSimpleName()); try { sxpEpProviderProvider.close(); } catch (Exception e) { LOG.warn("Exception while closing ... {}", e.getMessage()); } return Futures.immediateFuture(null); }
SxpEpProviderProviderInstance implements SxpEpProviderProvider, ClusterSingletonService, AutoCloseable { @Override public ListenableFuture<Void> closeServiceInstance() { LOG.info("Instance {} closed", this.getClass().getSimpleName()); try { sxpEpProviderProvider.close(); } catch (Exception e) { LOG.warn("Exception while closing ... {}", e.getMessage()); } return Futures.immediateFuture(null); } }
SxpEpProviderProviderInstance implements SxpEpProviderProvider, ClusterSingletonService, AutoCloseable { @Override public ListenableFuture<Void> closeServiceInstance() { LOG.info("Instance {} closed", this.getClass().getSimpleName()); try { sxpEpProviderProvider.close(); } catch (Exception e) { LOG.warn("Exception while closing ... {}", e.getMessage()); } return Futures.immediateFuture(null); } SxpEpProviderProviderInstance(DataBroker dataBroker, BaseEndpointService endpointService,
                                         DomainSpecificRegistry registry,
                                         ClusterSingletonServiceProvider clusterSingletonService,
                                         SgtGeneratorConfig sgtGeneratorConfig); }
SxpEpProviderProviderInstance implements SxpEpProviderProvider, ClusterSingletonService, AutoCloseable { @Override public ListenableFuture<Void> closeServiceInstance() { LOG.info("Instance {} closed", this.getClass().getSimpleName()); try { sxpEpProviderProvider.close(); } catch (Exception e) { LOG.warn("Exception while closing ... {}", e.getMessage()); } return Futures.immediateFuture(null); } SxpEpProviderProviderInstance(DataBroker dataBroker, BaseEndpointService endpointService,
                                         DomainSpecificRegistry registry,
                                         ClusterSingletonServiceProvider clusterSingletonService,
                                         SgtGeneratorConfig sgtGeneratorConfig); void initialize(); @Override void instantiateServiceInstance(); @Override ListenableFuture<Void> closeServiceInstance(); @Override void close(); @Override ServiceGroupIdentifier getIdentifier(); @Override EPToSgtMapper getEPToSgtMapper(); @Override EPPolicyTemplateProviderRegistry getEPPolicyTemplateProviderRegistry(); }
SxpEpProviderProviderInstance implements SxpEpProviderProvider, ClusterSingletonService, AutoCloseable { @Override public ListenableFuture<Void> closeServiceInstance() { LOG.info("Instance {} closed", this.getClass().getSimpleName()); try { sxpEpProviderProvider.close(); } catch (Exception e) { LOG.warn("Exception while closing ... {}", e.getMessage()); } return Futures.immediateFuture(null); } SxpEpProviderProviderInstance(DataBroker dataBroker, BaseEndpointService endpointService,
                                         DomainSpecificRegistry registry,
                                         ClusterSingletonServiceProvider clusterSingletonService,
                                         SgtGeneratorConfig sgtGeneratorConfig); void initialize(); @Override void instantiateServiceInstance(); @Override ListenableFuture<Void> closeServiceInstance(); @Override void close(); @Override ServiceGroupIdentifier getIdentifier(); @Override EPToSgtMapper getEPToSgtMapper(); @Override EPPolicyTemplateProviderRegistry getEPPolicyTemplateProviderRegistry();  }