Package com.graphhopper.storage
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 Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all contained objects from the directory and releases its resources.void
close()
Releases all allocated resources from the directory without removing backing files.create()
Creates a new DataAccess object with the given name in the location of this Directory.getDAs()
getDefaultType
(String dataAccess, boolean preferInts) void
Removes the specified object from the directory.
-
Method Details
-
getLocation
String getLocation()- Returns:
- an id or location in the local filesystem.
-
create
Creates a new DataAccess object with the given name in the location of this Directory. Each name can only be used once. -
create
- Parameters:
segmentSize
- segment size in bytes or -1 to use the default of the corresponding DataAccess implementation
-
create
-
create
-
remove
Removes the specified object from the directory. -
getDefaultType
DAType getDefaultType()- Returns:
- the default type of a newly created DataAccess object
-
getDefaultType
-
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()
-