Class SubnetworkStorage

java.lang.Object
com.graphhopper.routing.subnetwork.SubnetworkStorage

public class SubnetworkStorage extends Object
This class handles storage of subnetwork ids for every node. Useful to pick the correct set of landmarks or fail fast for routing when two nodes are from different subnetworks.
Author:
Peter Karich
  • Constructor Details

    • SubnetworkStorage

      public SubnetworkStorage(DataAccess da)
  • Method Details

    • getSubnetwork

      public int getSubnetwork(int nodeId)
      Returns the subnetwork ID for the specified nodeId or 0 if non is associated e.g. because the subnetwork is too small.
    • setSubnetwork

      public void setSubnetwork(int nodeId, int subnetwork)
      This method sets the subnetwork if of the specified nodeId. Default is 0 and means subnetwork was too small to be useful to be stored.
    • loadExisting

      public boolean loadExisting()
    • create

      public SubnetworkStorage create(long byteCount)
    • flush

      public void flush()
    • close

      public void close()
    • isClosed

      public boolean isClosed()
    • getCapacity

      public long getCapacity()