public static String getTempPath() { return OFileUtils.getPath(System.getProperty("java.io.tmpdir") + "/orientdb/"); }
public static String getDirectory(String iPath) { iPath = getPath(iPath); int pos = iPath.lastIndexOf("/"); if (pos == -1) return ""; return iPath.substring(0, pos); }
public static String getDirectory(String iPath) { iPath = getPath(iPath); int pos = iPath.lastIndexOf("/"); if (pos == -1) return ""; return iPath.substring(0, pos); }
public static String getHomePath() { String v = System.getProperty("orient.home"); if (v == null) v = OSystemVariableResolver.resolveVariable(ORIENTDB_HOME); return OFileUtils.getPath(v); }
@Override protected String connectionUri(final String name) { try { File dir = directory(name); DirectoryHelper.mkdir(dir); return "plocal:" + OFileUtils.getPath(dir.getAbsolutePath()).replace("//", "/"); } catch (IOException e) { throw new RuntimeException(e); } } }
@Override protected String connectionUri(final String name) { try { File dir = directory(name); DirectoryHelper.mkdir(dir); // OHazelcastPlugin.onOpen() assumes that dbUri.startsWith("plocal:" + dbDirectory) // We're well advised to meet that assumption or clustering won't work, more specifically we need to form // plocal:/data/dbName for Unix/OSX and plocal:D:/data/dbName for Win (no slash before drive letter) return "plocal:" + OFileUtils.getPath(dir.getAbsolutePath()).replace("//", "/"); } catch (IOException e) { throw new RuntimeException(e); } }
public OrientBaseGraph(final String url, final String username, final String password) { this.url = OFileUtils.getPath(url); this.username = username; this.password = password; this.openOrCreate(); config(); }
public OrientBaseGraph(final String url, final String username, final String password) { this.pool = null; this.url = OFileUtils.getPath(url); this.username = username; this.password = password; this.openOrCreate(); readDatabaseConfiguration(); }
public OLocalPaginatedStorage(final String name, final String filePath, final String mode, final int id, OReadCache readCache, OClosableLinkedContainer<Long, OFileClassic> files, final long walMaxSegSize) throws IOException { super(name, filePath, mode, id); this.walMaxSegSize = walMaxSegSize; this.files = files; this.readCache = readCache; String sp = OSystemVariableResolver.resolveSystemVariables(OFileUtils.getPath(new File(url).getPath())); storagePath = Paths.get(OIOUtils.getPathFromDatabaseName(sp)); variableParser = new OStorageVariableParser(storagePath); configuration = new OStorageConfigurationSegment(this); DELETE_MAX_RETRIES = getConfiguration().getContextConfiguration().getValueAsInteger(OGlobalConfiguration.FILE_DELETE_RETRY); DELETE_WAIT_TIME = getConfiguration().getContextConfiguration().getValueAsInteger(OGlobalConfiguration.FILE_DELETE_DELAY); dirtyFlag = new OPaginatedStorageDirtyFlag(storagePath.resolve("dirty.fl")); }