diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/OCluster.java b/core/src/main/java/com/orientechnologies/orient/core/storage/OCluster.java index adfa82d69c8..51f2bb25bf1 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/storage/OCluster.java +++ b/core/src/main/java/com/orientechnologies/orient/core/storage/OCluster.java @@ -29,7 +29,7 @@ public interface OCluster { enum ATTRIBUTES { - NAME, RECORD_GROW_FACTOR, RECORD_OVERFLOW_GROW_FACTOR, CONFLICTSTRATEGY, STATUS, ENCRYPTION + NAME, CONFLICTSTRATEGY, STATUS, ENCRYPTION } void configure(int iId, String iClusterName) throws IOException; diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v0/OPaginatedClusterV0.java b/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v0/OPaginatedClusterV0.java index 33be8d729ed..a1b6e9facb7 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v0/OPaginatedClusterV0.java +++ b/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v0/OPaginatedClusterV0.java @@ -331,12 +331,6 @@ public Object set(final OCluster.ATTRIBUTES attribute, final Object value) throw case NAME: setNameInternal(stringValue); break; - case RECORD_GROW_FACTOR: - setRecordGrowFactorInternal(stringValue); - break; - case RECORD_OVERFLOW_GROW_FACTOR: - setRecordOverflowGrowFactorInternal(stringValue); - break; case CONFLICTSTRATEGY: setRecordConflictStrategy(stringValue); break; @@ -1436,38 +1430,6 @@ private void setEncryptionInternal(final String iMethod, final String iKey) { } } - private void setRecordOverflowGrowFactorInternal(final String stringValue) { - try { - final float growFactor = Float.parseFloat(stringValue); - if (growFactor < 1) { - throw new OPaginatedClusterException(ATTRIBUTES.RECORD_OVERFLOW_GROW_FACTOR + " cannot be less than 1", this); - } - - config.recordOverflowGrowFactor = growFactor; - ((OClusterBasedStorageConfiguration) storage.getConfiguration()).updateCluster(config); - } catch (final NumberFormatException nfe) { - throw OException.wrapException(new OPaginatedClusterException( - "Invalid value for cluster attribute " + OCluster.ATTRIBUTES.RECORD_OVERFLOW_GROW_FACTOR + " was passed [" + stringValue - + "]", this), nfe); - } - } - - private void setRecordGrowFactorInternal(final String stringValue) { - try { - final float growFactor = Float.parseFloat(stringValue); - if (growFactor < 1) { - throw new OPaginatedClusterException(ATTRIBUTES.RECORD_GROW_FACTOR + " cannot be less than 1", this); - } - - config.recordGrowFactor = growFactor; - ((OClusterBasedStorageConfiguration) storage.getConfiguration()).updateCluster(config); - } catch (final NumberFormatException nfe) { - throw OException.wrapException(new OPaginatedClusterException( - "Invalid value for cluster attribute " + OCluster.ATTRIBUTES.RECORD_GROW_FACTOR + " was passed [" + stringValue + "]", - this), nfe); - } - } - private void setNameInternal(final String newName) throws IOException { writeCache.renameFile(fileId, newName + getExtension()); diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v1/OPaginatedClusterV1.java b/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v1/OPaginatedClusterV1.java index 67525060c9f..0c7ead7a864 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v1/OPaginatedClusterV1.java +++ b/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v1/OPaginatedClusterV1.java @@ -334,12 +334,6 @@ public Object set(final ATTRIBUTES attribute, final Object value) throws IOExcep case NAME: setNameInternal(stringValue); break; - case RECORD_GROW_FACTOR: - setRecordGrowFactorInternal(stringValue); - break; - case RECORD_OVERFLOW_GROW_FACTOR: - setRecordOverflowGrowFactorInternal(stringValue); - break; case CONFLICTSTRATEGY: setRecordConflictStrategy(stringValue); break; @@ -1435,37 +1429,6 @@ private void setEncryptionInternal(final String iMethod, final String iKey) { } } - private void setRecordOverflowGrowFactorInternal(final String stringValue) { - try { - final float growFactor = Float.parseFloat(stringValue); - if (growFactor < 1) { - throw new OPaginatedClusterException(ATTRIBUTES.RECORD_OVERFLOW_GROW_FACTOR + " cannot be less than 1", this); - } - - config.recordOverflowGrowFactor = growFactor; - ((OClusterBasedStorageConfiguration) storageLocal.getConfiguration()).updateCluster(config); - } catch (final NumberFormatException nfe) { - throw OException.wrapException(new OPaginatedClusterException( - "Invalid value for cluster attribute " + ATTRIBUTES.RECORD_OVERFLOW_GROW_FACTOR + " was passed [" + stringValue + "]", - this), nfe); - } - } - - private void setRecordGrowFactorInternal(final String stringValue) { - try { - final float growFactor = Float.parseFloat(stringValue); - if (growFactor < 1) { - throw new OPaginatedClusterException(ATTRIBUTES.RECORD_GROW_FACTOR + " cannot be less than 1", this); - } - - config.recordGrowFactor = growFactor; - ((OClusterBasedStorageConfiguration) storageLocal.getConfiguration()).updateCluster(config); - } catch (final NumberFormatException nfe) { - throw OException.wrapException(new OPaginatedClusterException( - "Invalid value for cluster attribute " + ATTRIBUTES.RECORD_GROW_FACTOR + " was passed [" + stringValue + "]", this), nfe); - } - } - private void setNameInternal(final String newName) throws IOException { writeCache.renameFile(fileId, newName + getExtension()); diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v2/OPaginatedClusterV2.java b/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v2/OPaginatedClusterV2.java index 8598998cc7e..dce1fbb97b2 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v2/OPaginatedClusterV2.java +++ b/core/src/main/java/com/orientechnologies/orient/core/storage/cluster/v2/OPaginatedClusterV2.java @@ -122,8 +122,7 @@ public OPaginatedClusterV2(final String name, final String dataExtension, final } @Override - public void configure(final int id, final String clusterName) - throws IOException { + public void configure(final int id, final String clusterName) throws IOException { acquireExclusiveLock(); try { final OContextConfiguration ctxCfg = storage.getConfiguration().getContextConfiguration(); @@ -325,12 +324,6 @@ public Object set(final ATTRIBUTES attribute, final Object value) throws IOExcep case NAME: setNameInternal(stringValue); break; - case RECORD_GROW_FACTOR: - setRecordGrowFactorInternal(stringValue); - break; - case RECORD_OVERFLOW_GROW_FACTOR: - setRecordOverflowGrowFactorInternal(stringValue); - break; case CONFLICTSTRATEGY: setRecordConflictStrategy(stringValue); break; @@ -1395,37 +1388,6 @@ private void init(final OStorageClusterConfiguration config) throws IOException this.id = config.getId(); } - private void setRecordOverflowGrowFactorInternal(final String stringValue) { - try { - final float growFactor = Float.parseFloat(stringValue); - if (growFactor < 1) { - throw new OPaginatedClusterException(ATTRIBUTES.RECORD_OVERFLOW_GROW_FACTOR + " cannot be less than 1", this); - } - - config.recordOverflowGrowFactor = growFactor; - ((OClusterBasedStorageConfiguration) storageLocal.getConfiguration()).updateCluster(config); - } catch (final NumberFormatException nfe) { - throw OException.wrapException(new OPaginatedClusterException( - "Invalid value for cluster attribute " + ATTRIBUTES.RECORD_OVERFLOW_GROW_FACTOR + " was passed [" + stringValue + "]", - this), nfe); - } - } - - private void setRecordGrowFactorInternal(final String stringValue) { - try { - final float growFactor = Float.parseFloat(stringValue); - if (growFactor < 1) { - throw new OPaginatedClusterException(ATTRIBUTES.RECORD_GROW_FACTOR + " cannot be less than 1", this); - } - - config.recordGrowFactor = growFactor; - ((OClusterBasedStorageConfiguration) storageLocal.getConfiguration()).updateCluster(config); - } catch (final NumberFormatException nfe) { - throw OException.wrapException(new OPaginatedClusterException( - "Invalid value for cluster attribute " + ATTRIBUTES.RECORD_GROW_FACTOR + " was passed [" + stringValue + "]", this), nfe); - } - } - private void setNameInternal(final String newName) throws IOException { writeCache.renameFile(fileId, newName + getExtension());