public OrientDBConfigBuilder addConfig(OGlobalConfiguration configuration, Object value) { configurations.setValue(configuration, value); return this; }
private void bindPropertiesToContextGlobal(OContextConfiguration configuration, final Map<OGlobalConfiguration, Object> iProperties) { final String connectionStrategy = iProperties != null ? (String) iProperties.get("connectionStrategy") : null; if (connectionStrategy != null) configuration.setValue(OGlobalConfiguration.CLIENT_CONNECTION_STRATEGY, connectionStrategy); final String compressionMethod = iProperties != null ? (String) iProperties.get(OGlobalConfiguration.STORAGE_COMPRESSION_METHOD) : null; if (compressionMethod != null) // SAVE COMPRESSION METHOD IN CONFIGURATION configuration.setValue(OGlobalConfiguration.STORAGE_COMPRESSION_METHOD, compressionMethod); final String encryptionMethod = iProperties != null ? (String) iProperties.get(OGlobalConfiguration.STORAGE_ENCRYPTION_METHOD) : null; if (encryptionMethod != null) // SAVE ENCRYPTION METHOD IN CONFIGURATION configuration.setValue(OGlobalConfiguration.STORAGE_ENCRYPTION_METHOD, encryptionMethod); final String encryptionKey = iProperties != null ? (String) iProperties.get(OGlobalConfiguration.STORAGE_ENCRYPTION_KEY) : null; if (encryptionKey != null) // SAVE ENCRYPTION KEY IN CONFIGURATION configuration.setValue(OGlobalConfiguration.STORAGE_ENCRYPTION_KEY, encryptionKey); }
public OrientDBConfigBuilder fromMap(Map<String, Object> values) { for (Map.Entry<String, Object> entry : values.entrySet()) { configurations.setValue(entry.getKey(), entry.getValue()); } return this; }
private void bindPropertiesToContext(OContextConfiguration configuration, final Map<String, Object> iProperties) { final String connectionStrategy = iProperties != null ? (String) iProperties.get("connectionStrategy") : null; if (connectionStrategy != null) configuration.setValue(OGlobalConfiguration.CLIENT_CONNECTION_STRATEGY, connectionStrategy); final String compressionMethod = iProperties != null ? (String) iProperties.get(OGlobalConfiguration.STORAGE_COMPRESSION_METHOD.getKey().toLowerCase(Locale.ENGLISH)) : null; if (compressionMethod != null) // SAVE COMPRESSION METHOD IN CONFIGURATION configuration.setValue(OGlobalConfiguration.STORAGE_COMPRESSION_METHOD, compressionMethod); final String encryptionMethod = iProperties != null ? (String) iProperties.get(OGlobalConfiguration.STORAGE_ENCRYPTION_METHOD.getKey().toLowerCase(Locale.ENGLISH)) : null; if (encryptionMethod != null) // SAVE ENCRYPTION METHOD IN CONFIGURATION configuration.setValue(OGlobalConfiguration.STORAGE_ENCRYPTION_METHOD, encryptionMethod); final String encryptionKey = iProperties != null ? (String) iProperties.get(OGlobalConfiguration.STORAGE_ENCRYPTION_KEY.getKey().toLowerCase(Locale.ENGLISH)) : null; if (encryptionKey != null) // SAVE ENCRYPTION KEY IN CONFIGURATION configuration.setValue(OGlobalConfiguration.STORAGE_ENCRYPTION_KEY, encryptionKey); }
private void autoInitClusters() { if (getContextConfiguration().getValueAsInteger(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS) == 0) { final int cpus = Runtime.getRuntime().availableProcessors(); getContextConfiguration().setValue(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS, cpus > 64 ? 64 : cpus); } }
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; }
public void setMinimumClusters(final int minimumClusters) { lock.acquireWriteLock(); try { getContextConfiguration().setValue(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS, minimumClusters); autoInitClusters(); } finally { lock.releaseWriteLock(); } }
public void reCreatePool() { close(); OrientDBConfig config = OrientDBConfig.defaultConfig(); config.getConfigurations().setValue(OGlobalConfiguration.DB_POOL_MAX, this.maxSize); this.pool = new ODatabasePool(this.orientdb, this.dbName, this.userName, this.password, config); }
if (cfg != null) { if (value != null) configuration.setValue(key, OType.convert(value, cfg.getType())); } else OLogManager.instance().warn(this, "Ignored storage configuration because not supported: %s=%s", key, value);