public String getDirectory() { lock.acquireReadLock(); try { if (fileTemplate.location != null) { return fileTemplate.getLocation(); } } finally { lock.releaseReadLock(); } if (storage instanceof OLocalPaginatedStorage) { return ((OLocalPaginatedStorage) storage).getStoragePath().toString(); } else { return null; } }
private void clear() { fileTemplate = new OStorageSegmentConfiguration(); charset = DEFAULT_CHARSET; synchronized (properties) { properties.clear(); } version = -1; name = null; schemaRecordId = null; dictionaryRecordId = null; indexMgrRecordId = null; dateFormat = DEFAULT_DATE_FORMAT; dateTimeFormat = DEFAULT_DATETIME_FORMAT; binaryFormatVersion = 0; clusters = Collections.synchronizedList(new ArrayList<>()); localeLanguage = Locale.getDefault().getLanguage(); localeCountry = Locale.getDefault().getCountry(); timeZone = TimeZone.getDefault(); localeInstance = null; clusterSelection = null; conflictStrategy = null; getContextConfiguration().setValue(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS, OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS.getValueAsInteger()); // 0 = AUTOMATIC autoInitClusters(); recordSerializer = null; recordSerializerVersion = 0; indexEngines = new ConcurrentHashMap<>(); validation = getContextConfiguration().getValueAsBoolean(OGlobalConfiguration.DB_VALIDATION); binaryFormatVersion = CURRENT_BINARY_FORMAT_VERSION; }