@Test public void wipeRouting() throws Exception { leftSide.forEach((routingDefinition -> { reactor.getRoutingServiceMap().put(routingDefinition.getIpAddress(), routingService); })); Mockito.when(routingService.removeRouteForCurrentService()).thenReturn(true); reactor.wipeRouting(); Mockito.verify(routingService, Mockito.times(3)).removeRouteForCurrentService(); }
@Override public FluentFuture<? extends CommitInfo> wipeRouting() { routingServiceMap.forEach((vIpAddress, routingService) -> { final boolean succeeded = routingService.removeRouteForCurrentService(); if (succeeded) { LOG.debug("wiped out route: {}", routingService); } else { LOG.warn("failed to wipe out route: {}", routingService); } }); routingServiceMap.clear(); return FluentFutures.immediateNullFluentFuture(); }
RouteReactorImpl implements RouteReactor { @Override public FluentFuture<? extends CommitInfo> wipeRouting() { routingServiceMap.forEach((vIpAddress, routingService) -> { final boolean succeeded = routingService.removeRouteForCurrentService(); if (succeeded) { LOG.debug("wiped out route: {}", routingService); } else { LOG.warn("failed to wipe out route: {}", routingService); } }); routingServiceMap.clear(); return FluentFutures.immediateNullFluentFuture(); } }
RouteReactorImpl implements RouteReactor { @Override public FluentFuture<? extends CommitInfo> wipeRouting() { routingServiceMap.forEach((vIpAddress, routingService) -> { final boolean succeeded = routingService.removeRouteForCurrentService(); if (succeeded) { LOG.debug("wiped out route: {}", routingService); } else { LOG.warn("failed to wipe out route: {}", routingService); } }); routingServiceMap.clear(); return FluentFutures.immediateNullFluentFuture(); } RouteReactorImpl(final DataBroker dataBroker, final RoutingServiceFactory routingServiceFactory); }
RouteReactorImpl implements RouteReactor { @Override public FluentFuture<? extends CommitInfo> wipeRouting() { routingServiceMap.forEach((vIpAddress, routingService) -> { final boolean succeeded = routingService.removeRouteForCurrentService(); if (succeeded) { LOG.debug("wiped out route: {}", routingService); } else { LOG.warn("failed to wipe out route: {}", routingService); } }); routingServiceMap.clear(); return FluentFutures.immediateNullFluentFuture(); } RouteReactorImpl(final DataBroker dataBroker, final RoutingServiceFactory routingServiceFactory); @Override FluentFuture<? extends CommitInfo> updateRouting(@Nullable final SxpClusterRoute oldRoute,
                                                            @Nullable final SxpClusterRoute newRoute); @Override FluentFuture<? extends CommitInfo> wipeRouting(); }
RouteReactorImpl implements RouteReactor { @Override public FluentFuture<? extends CommitInfo> wipeRouting() { routingServiceMap.forEach((vIpAddress, routingService) -> { final boolean succeeded = routingService.removeRouteForCurrentService(); if (succeeded) { LOG.debug("wiped out route: {}", routingService); } else { LOG.warn("failed to wipe out route: {}", routingService); } }); routingServiceMap.clear(); return FluentFutures.immediateNullFluentFuture(); } RouteReactorImpl(final DataBroker dataBroker, final RoutingServiceFactory routingServiceFactory); @Override FluentFuture<? extends CommitInfo> updateRouting(@Nullable final SxpClusterRoute oldRoute,
                                                            @Nullable final SxpClusterRoute newRoute); @Override FluentFuture<? extends CommitInfo> wipeRouting();  }