Interface Directory

All Known Implementing Classes:
GHDirectory, MMapDirectory, RAMDirectory

public interface Directory
Maintains a collection of DataAccess objects stored at the same location. One GraphStorage per Directory as we need one to maintain one DataAccess object for nodes, edges and location2id index.

Author:
Peter Karich
  • Method Details

    • getLocation

      String getLocation()
      Returns:
      an id or location in the local filesystem.
    • create

      DataAccess create(String name)
      Creates a new DataAccess object with the given name in the location of this Directory. Each name can only be used once.
    • create

      DataAccess create(String name, int segmentSize)
      Parameters:
      segmentSize - segment size in bytes or -1 to use the default of the corresponding DataAccess implementation
    • create

      DataAccess create(String name, DAType type)
    • create

      DataAccess create(String name, DAType type, int segmentSize)
    • remove

      void remove(String name)
      Removes the specified object from the directory.
    • getDefaultType

      DAType getDefaultType()
      Returns:
      the default type of a newly created DataAccess object
    • getDefaultType

      DAType getDefaultType(String dataAccess, boolean preferInts)
    • clear

      void clear()
      Removes all contained objects from the directory and releases its resources.
    • close

      void close()
      Releases all allocated resources from the directory without removing backing files.
    • create

      Directory create()
    • getDAs

      Map<String,DataAccess> getDAs()