Examples of GraphSource


Examples of org.opentripplanner.routing.services.GraphSource

    public boolean reloadGraphs(boolean preEvict) {
        boolean allSucceeded = true;
        synchronized (graphSources) {
            Collection<String> routerIds = getRouterIds();
            for (String routerId : routerIds) {
                GraphSource graphSource = graphSources.get(routerId);
                boolean success = graphSource.reload(true, preEvict);
                if (!success) {
                    evictGraph(routerId);
                }
                allSucceeded &= success;
            }
View Full Code Here

Examples of org.opentripplanner.routing.services.GraphSource

        if (graphSource.getGraph() == null) {
            LOG.warn("Can't register router ID '{}', null graph.", routerId);
            return false;
        }
        synchronized (graphSources) {
            GraphSource oldSource = graphSources.get(routerId);
            if (oldSource != null) {
                LOG.info("Graph '{}' already registered. Nothing to do.", routerId);
                return false;
            }
            graphSources.put(routerId, graphSource);
View Full Code Here

Examples of org.opentripplanner.routing.services.GraphSource

    @Override
    public boolean evictGraph(String routerId) {
        LOG.info("Evicting graph '{}'", routerId);
        synchronized (graphSources) {
            GraphSource graphSource = graphSources.get(routerId);
            graphSources.remove(routerId);
            if (graphSource != null) {
                graphSource.evict();
                return true;
            } else {
                return false;
            }
        }
View Full Code Here

Examples of org.opentripplanner.routing.services.GraphSource

    private void autoReloadScan() {
        synchronized (graphSources) {
            Collection<String> routerIds = getRouterIds();
            for (String routerId : routerIds) {
                GraphSource graphSource = graphSources.get(routerId);
                boolean success = graphSource.reload(false, AUTORELOAD_PREEVICT);
                if (!success) {
                    evictGraph(routerId);
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.