Class DAType

java.lang.Object
com.graphhopper.storage.DAType

public class DAType extends Object
Defines how a DataAccess object is created.

Author:
Peter Karich
  • Field Details

    • RAM

      public static final DAType RAM
      The DA object is hold entirely in-memory. Loading and flushing is a no-op. See RAMDataAccess.
    • RAM_INT

      public static final DAType RAM_INT
      Optimized RAM DA type for integer access. The set and getBytes methods cannot be used.
    • RAM_STORE

      public static final DAType RAM_STORE
      The DA object is hold entirely in-memory. It will read load disc and flush to it if they equivalent methods are called. See RAMDataAccess.
    • RAM_INT_STORE

      public static final DAType RAM_INT_STORE
      Optimized RAM_STORE DA type for integer access. The set and getBytes methods cannot be used.
    • MMAP

      public static final DAType MMAP
      Memory mapped DA object. See MMapDataAccess.
    • MMAP_RO

      public static final DAType MMAP_RO
      Read-only memory mapped DA object. To avoid write access useful for reading on mobile or embedded data stores.
  • Constructor Details

    • DAType

      public DAType(DAType type)
    • DAType

      public DAType(DAType.MemRef memRef, boolean storing, boolean integ, boolean allowWrites)
  • Method Details

    • fromString

      public static DAType fromString(String dataAccess)
    • isAllowWrites

      public boolean isAllowWrites()
    • isInMemory

      public boolean isInMemory()
      Returns:
      true if data resides in the JVM heap.
    • isMMap

      public boolean isMMap()
    • isStoring

      public boolean isStoring()
      Temporary data or store (with loading and storing)? default is false
    • isInteg

      public boolean isInteg()
      Optimized for integer values? default is false
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object