use of org.onosproject.net.host.HostListener in project onos by opennetworkinglab.
the class RouteManager method activate.
@Activate
protected void activate() {
routeMonitor = new RouteMonitor(this, clusterService, storageService);
routeResolver = new RouteResolver(this, hostService);
threadFactory = groupedThreads("onos/route", "listener-%d", log);
hostEventExecutors = new PredictableExecutor(DEFAULT_BUCKETS, groupedThreads("onos/route-manager", "event-host-%d", log));
resolvedRouteStore = new DefaultResolvedRouteStore();
routeStore.setDelegate(delegate);
hostService.addListener(hostListener);
routeStore.getRouteTables().stream().flatMap(id -> routeStore.getRoutes(id).stream()).forEach(routeSet -> routeResolver.resolve(routeSet));
}
Aggregations