Package org.opentripplanner.updater

Examples of org.opentripplanner.updater.GraphUpdaterManager


    private static Logger LOG = LoggerFactory.getLogger(GraphUpdaterConfigurator.class);

    public void setupGraph(Graph graph, Preferences mainConfig) {
        // Create a updater manager for this graph
        GraphUpdaterManager updaterManager = new GraphUpdaterManager(graph);

        // Look for embedded config if it exists
        Properties embeddedGraphPreferences = graph.embeddedPreferences;
        Preferences embeddedConfig = null;
        if (embeddedGraphPreferences != null) {
            embeddedConfig = new PropertiesPreferences(embeddedGraphPreferences);
        }
        LOG.info("Using configurations: " + (mainConfig == null ? "" : "[main]") + " "
                + (embeddedConfig == null ? "" : "[embedded]"));
       
        // Apply configuration
        updaterManager = applyConfigurationToGraph(graph, updaterManager, Arrays.asList(mainConfig, embeddedConfig));

        // Stop the updater manager if it contains nothing
        if (updaterManager.size() == 0) {
            updaterManager.stop();
        }
        // Otherwise add it to the graph
        else {
            graph.updaterManager = updaterManager;
        }
View Full Code Here


        }
        return updaterManager;
    }

    public void shutdownGraph(Graph graph) {
        GraphUpdaterManager updaterManager = graph.updaterManager;
        if (updaterManager != null) {
            LOG.info("Stopping updater manager with " + updaterManager.size() + " updaters.");
            updaterManager.stop();
        }
    }
View Full Code Here

TOP

Related Classes of org.opentripplanner.updater.GraphUpdaterManager

Copyright © 2018 www.massapicom. 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.