public GHDirectory(String _location, DAType defaultType) { this.defaultType = defaultType; if (isEmpty(_location)) _location = new File("").getAbsolutePath(); if (!_location.endsWith("/")) _location += "/"; location = _location; File dir = new File(location); if (dir.exists() && !dir.isDirectory()) throw new RuntimeException("file '" + dir + "' exists but is not a directory"); // set default access to integer based // improves performance on server side, 10% faster for queries and preparation if (this.defaultType.isInMemory()) { if (isStoring()) { put("location_index", DAType.RAM_INT_STORE); put("edges", DAType.RAM_INT_STORE); put("nodes", DAType.RAM_INT_STORE); } else { put("location_index", DAType.RAM_INT); put("edges", DAType.RAM_INT); put("nodes", DAType.RAM_INT); } } }
public GHDirectory(String _location, DAType defaultType) { this.defaultType = defaultType; if (Helper.isEmpty(_location)) _location = new File("").getAbsolutePath(); if (!_location.endsWith("/")) _location += "/"; location = _location; File dir = new File(location); if (dir.exists() && !dir.isDirectory()) throw new RuntimeException("file '" + dir + "' exists but is not a directory"); // set default access to integer based // improves performance on server side, 10% faster for queries and preparation if (this.defaultType.isInMemory()) { if (isStoring()) { put("location_index", DAType.RAM_INT_STORE); put("edges", DAType.RAM_INT_STORE); put("nodes", DAType.RAM_INT_STORE); } else { put("location_index", DAType.RAM_INT); put("edges", DAType.RAM_INT); put("nodes", DAType.RAM_INT); } } }
public GHDirectory( String _location, DAType defaultType ) { this.defaultType = defaultType; if (Helper.isEmpty(_location)) _location = new File("").getAbsolutePath(); if (!_location.endsWith("/")) _location += "/"; location = _location; File dir = new File(location); if (dir.exists() && !dir.isDirectory()) throw new RuntimeException("file '" + dir + "' exists but is not a directory"); // set default access to integer based // improves performance on server side, 10% faster for queries and preparation if (this.defaultType.isInMemory()) { if (isStoring()) { put("location_index", DAType.RAM_INT_STORE); put("edges", DAType.RAM_INT_STORE); put("nodes", DAType.RAM_INT_STORE); } else { put("location_index", DAType.RAM_INT); put("edges", DAType.RAM_INT); put("nodes", DAType.RAM_INT); } } }