use of com.orientechnologies.orient.core.config.OStoragePaginatedClusterConfiguration in project orientdb by orientechnologies.
the class OAbstractPaginatedStorage method addDefaultClusters.
private void addDefaultClusters() throws IOException {
final String storageCompression = getConfiguration().getContextConfiguration().getValueAsString(OGlobalConfiguration.STORAGE_COMPRESSION_METHOD);
final String storageEncryption = getConfiguration().getContextConfiguration().getValueAsString(OGlobalConfiguration.STORAGE_ENCRYPTION_METHOD);
final String encryptionKey = getConfiguration().getContextConfiguration().getValueAsString(OGlobalConfiguration.STORAGE_ENCRYPTION_KEY);
final String stgConflictStrategy = getConflictStrategy().getName();
createClusterFromConfig(new OStoragePaginatedClusterConfiguration(configuration, clusters.size(), OMetadataDefault.CLUSTER_INTERNAL_NAME, null, true, 20, 4, storageCompression, storageEncryption, encryptionKey, stgConflictStrategy, OStorageClusterConfiguration.STATUS.ONLINE));
createClusterFromConfig(new OStoragePaginatedClusterConfiguration(configuration, clusters.size(), OMetadataDefault.CLUSTER_INDEX_NAME, null, false, OStoragePaginatedClusterConfiguration.DEFAULT_GROW_FACTOR, OStoragePaginatedClusterConfiguration.DEFAULT_GROW_FACTOR, storageCompression, storageEncryption, encryptionKey, stgConflictStrategy, OStorageClusterConfiguration.STATUS.ONLINE));
createClusterFromConfig(new OStoragePaginatedClusterConfiguration(configuration, clusters.size(), OMetadataDefault.CLUSTER_MANUAL_INDEX_NAME, null, false, 1, 1, storageCompression, storageEncryption, encryptionKey, stgConflictStrategy, OStorageClusterConfiguration.STATUS.ONLINE));
defaultClusterId = createClusterFromConfig(new OStoragePaginatedClusterConfiguration(configuration, clusters.size(), CLUSTER_DEFAULT_NAME, null, true, OStoragePaginatedClusterConfiguration.DEFAULT_GROW_FACTOR, OStoragePaginatedClusterConfiguration.DEFAULT_GROW_FACTOR, storageCompression, storageEncryption, encryptionKey, stgConflictStrategy, OStorageClusterConfiguration.STATUS.ONLINE));
}
use of com.orientechnologies.orient.core.config.OStoragePaginatedClusterConfiguration in project orientdb by orientechnologies.
the class OPaginatedCluster method configure.
@Override
public void configure(final OStorage storage, final int id, final String clusterName, final Object... parameters) throws IOException {
startOperation();
try {
acquireExclusiveLock();
try {
final OContextConfiguration ctxCfg = storage.getConfiguration().getContextConfiguration();
final String cfgCompression = ctxCfg.getValueAsString(OGlobalConfiguration.STORAGE_COMPRESSION_METHOD);
final String cfgEncryption = ctxCfg.getValueAsString(OGlobalConfiguration.STORAGE_ENCRYPTION_METHOD);
final String cfgEncryptionKey = ctxCfg.getValueAsString(OGlobalConfiguration.STORAGE_ENCRYPTION_KEY);
config = new OStoragePaginatedClusterConfiguration(storage.getConfiguration(), id, clusterName, null, true, OStoragePaginatedClusterConfiguration.DEFAULT_GROW_FACTOR, OStoragePaginatedClusterConfiguration.DEFAULT_GROW_FACTOR, cfgCompression, cfgEncryption, cfgEncryptionKey, null, OStorageClusterConfiguration.STATUS.ONLINE);
config.name = clusterName;
init((OAbstractPaginatedStorage) storage, config);
} finally {
releaseExclusiveLock();
}
} finally {
completeOperation();
}
}
Aggregations