OTPConfigurator configurator = new OTPConfigurator(params);
// start graph builder, if asked for
GraphBuilderTask graphBuilder = configurator.builderFromParameters();
if (graphBuilder != null) {
graphBuilder.run();
// Inform configurator which graph is to be used for in-memory handoff.
if (params.inMemory || params.preFlight) {
graphBuilder.getGraph().index(new DefaultStreetVertexIndexFactory());
configurator.makeGraphService(graphBuilder.getGraph());
}