/*
* Here we should not synchronize on graphSource as it may block for a while (during
* reload/autoreload). For normal operations a simple get do not need to be synchronized so
* we should be safe.
*/
GraphSource graphSource = graphSources.get(routerId);
if (graphSource == null) {
LOG.error("no graph registered with the routerId '{}'", routerId);
throw new GraphNotFoundException();
}
Graph graph = graphSource.getGraph();
if (graph == null) {
evictGraph(routerId);
throw new GraphNotFoundException();
}
return graph;