All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.updater.DataSource Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package org.opentripplanner.updater;

import java.util.List;

/**
 * DataSource interface that can be used for different types of realtime updaters. It is assumed
 * that these methods are never called in parallel (i.e. updater doesn't run on multiple threads).
 */
public interface DataSource {
  /**
   * Fetch current data about given type and availability from this source.
   *
   * @return true if this operation may have changed something in the list of types.
   */
  boolean update();

  /**
   * @return a List of all currently known objects. The updater will use this to update the Graph.
   */
  List getUpdates();

  /**
   * @see org.opentripplanner.updater.GraphUpdater#setup
   */
  default void setup() {}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy