You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ni...@apache.org on 2026/02/24 11:24:26 UTC
(ignite) branch master updated: IGNITE-27832 Remove MemoryConfiguration, PersistentStoreConfiguration (#12738)
This is an automated email from the ASF dual-hosted git repository.
nizhikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new af5f7aafe99 IGNITE-27832 Remove MemoryConfiguration, PersistentStoreConfiguration (#12738)
af5f7aafe99 is described below
commit af5f7aafe99025d150c9b4c7f2979c7016065433
Author: Nikolay <ni...@apache.org>
AuthorDate: Tue Feb 24 14:24:20 2026 +0300
IGNITE-27832 Remove MemoryConfiguration, PersistentStoreConfiguration (#12738)
---
.../persistence/FoldersReuseCompatibilityTest.java | 19 +-
.../PersistenceBasicCompatibilityTest.java | 5 +-
.../main/java/org/apache/ignite/MemoryMetrics.java | 10 +-
.../ignite/configuration/IgniteConfiguration.java | 72 ---
.../ignite/configuration/MemoryConfiguration.java | 318 ----------
.../configuration/MemoryPolicyConfiguration.java | 391 ------------
.../PersistentStoreConfiguration.java | 690 ---------------------
.../org/apache/ignite/internal/IgniteKernal.java | 23 +-
.../ignite/internal/IgniteNodeAttributes.java | 4 -
.../org/apache/ignite/internal/IgnitionEx.java | 129 ----
.../cache/ValidationOnNodeJoinUtils.java | 13 -
.../GridCacheDatabaseSharedManager.java | 2 +-
.../platform/utils/PlatformConfigurationUtils.java | 170 -----
.../cache/IgniteMarshallerCacheFSRestoreTest.java | 10 +-
.../IgniteTopologyValidatorGridSplitCacheTest.java | 8 +-
.../cache/MemoryPolicyConfigValidationTest.java | 407 ------------
.../MemoryPolicyInitializationTest.java | 324 ----------
.../ignite/testsuites/IgniteCacheTestSuite2.java | 4 -
.../cpp/core-test/config/affinity-test-32.xml | 23 +-
.../cpp/core-test/config/cache-identity-32.xml | 23 +-
.../config/cache-native-persistence-test-32.xml | 23 +-
.../cpp/core-test/config/cache-query-32.xml | 23 +-
.../core-test/config/cache-query-continuous-32.xml | 23 +-
.../cpp/core-test/config/cache-query-schema-32.xml | 23 +-
.../cpp/core-test/config/cache-store-32.xml | 23 +-
.../cpp/core-test/config/cache-test-32.xml | 23 +-
.../cpp/core-test/config/compute-client-32.xml | 23 +-
.../cpp/core-test/config/compute-server0-32.xml | 23 +-
.../cpp/core-test/config/compute-server1-32.xml | 23 +-
.../platforms/cpp/core-test/config/interop-32.xml | 23 +-
modules/platforms/cpp/core-test/config/invalid.xml | 24 +-
.../platforms/cpp/core-test/config/isolated-32.xml | 23 +-
.../cpp/core-test/config/persistence-store-32.xml | 23 +-
.../core-test/config/persistence-store-default.xml | 10 +-
.../cpp/odbc-test/config/queries-auth-32.xml | 30 +-
.../cpp/odbc-test/config/queries-auth.xml | 10 +-
.../cpp/odbc-test/config/queries-schema-32.xml | 23 +-
.../cpp/odbc-test/config/queries-ssl-32.xml | 23 +-
.../cpp/odbc-test/config/queries-test-32.xml | 23 +-
.../cpp/thin-client-test/config/auth-32.xml | 23 +-
.../cpp/thin-client-test/config/auth-default.xml | 10 +-
.../cpp/thin-client-test/config/cache-32.xml | 23 +-
.../config/cache-query-continuous-32.xml | 23 +-
.../cpp/thin-client-test/config/compute-32.xml | 23 +-
.../cpp/thin-client-test/config/interop-32.xml | 23 +-
.../cpp/thin-client-test/config/non-ssl-32.xml | 23 +-
.../config/sql-query-fields-32.xml | 23 +-
.../cpp/thin-client-test/config/ssl-32.xml | 23 +-
.../config/ssl-no-client-auth-32.xml | 23 +-
.../Cache/CacheConfigurationTest.cs | 26 -
.../Cache/MemoryMetricsTest.cs | 159 -----
.../Cache/PersistentStoreTestObsolete.cs | 186 ------
.../Config/full-config.xml | 11 -
.../IgniteConfigurationSerializerTest.cs | 105 ----
.../IgniteConfigurationTest.cs | 34 -
.../Cache/Configuration/CacheConfiguration.cs | 12 -
.../Cache/Configuration/DataPageEvictionMode.cs | 62 --
.../Cache/Configuration/MemoryConfiguration.cs | 178 ------
.../Configuration/MemoryPolicyConfiguration.cs | 200 ------
.../Configuration/DataStorageConfiguration.cs | 2 +-
.../platforms/dotnet/Apache.Ignite.Core/IIgnite.cs | 22 -
.../Apache.Ignite.Core/IgniteConfiguration.cs | 58 --
.../IgniteConfigurationSection.xsd | 209 -------
.../PersistentStoreConfiguration.cs | 335 ----------
.../yardstick/config/ignite-base-load-config.xml | 9 +-
modules/yardstick/config/ignite-db-base-config.xml | 5 +-
modules/yardstick/config/ignite-rdbms-config.xml | 19 +-
67 files changed, 349 insertions(+), 4564 deletions(-)
diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java
index 0d1ea6a7584..90679334d6c 100644
--- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java
+++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java
@@ -25,10 +25,9 @@ import java.util.function.Consumer;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.compatibility.testframework.junits.SkipTestIfIsJdkNewer;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
-import org.apache.ignite.configuration.MemoryPolicyConfiguration;
-import org.apache.ignite.configuration.PersistentStoreConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest;
import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
@@ -174,16 +173,10 @@ public class FoldersReuseCompatibilityTest extends IgnitePersistenceCompatibilit
* @param cfg ignite config to setup.
*/
private static void configPersistence(IgniteConfiguration cfg) {
- final PersistentStoreConfiguration psCfg = new PersistentStoreConfiguration();
-
- cfg.setPersistentStoreConfiguration(psCfg);
-
- final MemoryConfiguration memCfg = new MemoryConfiguration();
- final MemoryPolicyConfiguration memPolCfg = new MemoryPolicyConfiguration();
-
- memPolCfg.setMaxSize(32L * 1024 * 1024); // we don't need much memory for this test
- memCfg.setMemoryPolicies(memPolCfg);
- cfg.setMemoryConfiguration(memCfg);
+ cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDataRegionConfigurations(new DataRegionConfiguration()
+ // we don't need much memory for this test
+ .setMaxSize(32L * 1024 * 1024)
+ .setPersistenceEnabled(true)));
}
/**
diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/PersistenceBasicCompatibilityTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/PersistenceBasicCompatibilityTest.java
index cfeba9bf2c1..2a34e543f59 100644
--- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/PersistenceBasicCompatibilityTest.java
+++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/PersistenceBasicCompatibilityTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.DataRegionConfiguration;
import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.PersistentStoreConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -248,7 +247,9 @@ public class PersistenceBasicCompatibilityTest extends IgnitePersistenceCompatib
cfg.setPeerClassLoadingEnabled(false);
- cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration());
+ cfg.setDataStorageConfiguration(new DataStorageConfiguration()
+ .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
+ .setPersistenceEnabled(true)));
cfg.setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(compactFooter));
}
diff --git a/modules/core/src/main/java/org/apache/ignite/MemoryMetrics.java b/modules/core/src/main/java/org/apache/ignite/MemoryMetrics.java
index 48939a8a20b..c9cf1a41bd6 100644
--- a/modules/core/src/main/java/org/apache/ignite/MemoryMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/MemoryMetrics.java
@@ -17,15 +17,15 @@
package org.apache.ignite;
-import org.apache.ignite.configuration.MemoryConfiguration;
-import org.apache.ignite.configuration.MemoryPolicyConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.spi.metric.ReadOnlyMetricRegistry;
/**
* This interface provides page memory related metrics of a specific Apache Ignite node. The overall page memory
- * architecture is covered in {@link MemoryConfiguration}.
+ * architecture is covered in {@link DataStorageConfiguration}.
* <p>
- * Since there are can be several memory regions configured with {@link MemoryPolicyConfiguration} on an individual
+ * Since there are can be several data regions configured with {@link DataRegionConfiguration} on an individual
* Apache Ignite node, the metrics for every region will be collected and obtained separately.
* <p>
* There are two ways to get the metrics of an Apache Ignite node.
@@ -43,7 +43,7 @@ import org.apache.ignite.spi.metric.ReadOnlyMetricRegistry;
* <p>
* Memory metrics collection is not a free operation and might affect performance of an application. This is the reason
* why the metrics are turned off by default. To enable the collection you can use both
- * {@link MemoryPolicyConfiguration#setMetricsEnabled(boolean)} configuration property.
+ * {@link DataStorageConfiguration#setMetricsEnabled(boolean)} configuration property.
*
* @deprecated Check the {@link ReadOnlyMetricRegistry} with "name=io.dataregion.{data_region_name}" instead.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index 8909b3d6fad..c767e193730 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -535,14 +535,6 @@ public class IgniteConfiguration {
/** Custom executor configurations. */
private ExecutorConfiguration[] execCfgs;
- /** Page memory configuration. */
- @Deprecated
- private MemoryConfiguration memCfg;
-
- /** Persistence store configuration. */
- @Deprecated
- private PersistentStoreConfiguration pstCfg;
-
/** Page memory configuration. */
private DataStorageConfiguration dsCfg;
@@ -651,8 +643,6 @@ public class IgniteConfiguration {
binaryCfg = cfg.getBinaryConfiguration();
clusterStateOnStart = cfg.getClusterStateOnStart();
dsCfg = cfg.getDataStorageConfiguration();
- memCfg = cfg.getMemoryConfiguration();
- pstCfg = cfg.getPersistentStoreConfiguration();
cacheCfg = cfg.getCacheConfiguration();
cacheKeyCfg = cfg.getCacheKeyConfiguration();
cacheSanityCheckEnabled = cfg.isCacheSanityCheckEnabled();
@@ -2634,68 +2624,6 @@ public class IgniteConfiguration {
return this;
}
- /**
- * Gets page memory configuration.
- *
- * @return Memory configuration.
- * @deprecated Use {@link DataStorageConfiguration} instead.
- */
- @Deprecated
- public MemoryConfiguration getMemoryConfiguration() {
- return memCfg;
- }
-
- /**
- * Sets page memory configuration.
- *
- * @param memCfg Memory configuration.
- * @return {@code this} for chaining.
- * @deprecated Use {@link DataStorageConfiguration} instead.
- */
- @Deprecated
- public IgniteConfiguration setMemoryConfiguration(MemoryConfiguration memCfg) {
- this.memCfg = memCfg;
-
- return this;
- }
-
- /**
- * Gets persistence configuration used by Apache Ignite Persistent Store.
- *
- * @return Persistence configuration.
- *
- * @deprecated Part of old API. Use {@link DataStorageConfiguration} for configuring persistence instead.
- */
- @Deprecated
- public PersistentStoreConfiguration getPersistentStoreConfiguration() {
- return pstCfg;
- }
-
- /**
- * @return Flag {@code true} if persistence is enabled, {@code false} if disabled.
- *
- * @deprecated Part of legacy configuration API. Doesn't work if new configuration API is used.
- */
- @Deprecated
- public boolean isPersistentStoreEnabled() {
- return pstCfg != null;
- }
-
- /**
- * Sets persistence configuration activating Apache Ignite Persistent Store.
- *
- * @param pstCfg Persistence configuration.
- * @return {@code this} for chaining.
- *
- * @deprecated Part of old API. Use {@link DataStorageConfiguration} for configuring persistence instead.
- */
- @Deprecated
- public IgniteConfiguration setPersistentStoreConfiguration(PersistentStoreConfiguration pstCfg) {
- this.pstCfg = pstCfg;
-
- return this;
- }
-
/**
* Gets flag indicating whether the cluster will be active on start. If cluster is not active on start,
* there will be no cache partition map exchanges performed until the cluster is activated. This should
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
deleted file mode 100644
index 8d9ffbed35a..00000000000
--- a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.configuration;
-
-import java.io.Serializable;
-import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
-
-/**
- * A page memory configuration for an Apache Ignite node. The page memory is a manageable off-heap based memory
- * architecture that divides all expandable memory regions into pages of fixed size
- * (see {@link MemoryConfiguration#getPageSize()}. An individual page can store one or many cache key-value entries
- * that allows reusing the memory in the most efficient way and avoid memory fragmentation issues.
- * <p>
- * By default, the page memory allocates a single expandable memory region using settings of
- * {@link MemoryConfiguration#createDefaultPolicyConfig()}. All the caches that will be configured in an application
- * will be mapped to this memory region by default, thus, all the cache data will reside in that memory region.
- * <p>
- * If initial size of the default memory region doesn't satisfy requirements or it's required to have multiple memory
- * regions with different properties then {@link MemoryPolicyConfiguration} can be used for both scenarios.
- * For instance, using memory policies you can define memory regions of different maximum size, eviction policies,
- * swapping options, etc. Once you define a new memory region you can bind particular Ignite caches to it.
- * <p>
- * To learn more about memory policies refer to {@link MemoryPolicyConfiguration} documentation.
- * <p>Sample configuration below shows how to make 5 GB memory regions the default one for Apache Ignite:</p>
- * <pre>
- * {@code
- * <property name="memoryConfiguration">
- * <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- * <property name="systemCacheInitialSize" value="#{100L * 1024 * 1024}"/>
- * <property name="defaultMemoryPolicyName" value="default_mem_plc"/>
- *
- * <property name="memoryPolicies">
- * <list>
- * <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- * <property name="name" value="default_mem_plc"/>
- * <property name="initialSize" value="#{5L * 1024 * 1024 * 1024}"/>
- * </bean>
- * </list>
- * </property>
- * </bean>
- * </property>
- * }
- * </pre>
- *
- * @deprecated Use {@link DataStorageConfiguration} instead.
- */
-@Deprecated
-public class MemoryConfiguration implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Default memory policy start size (256 MB). */
- public static final long DFLT_MEMORY_POLICY_INITIAL_SIZE = 256L * 1024 * 1024;
-
- /** Fraction of available memory to allocate for default DataRegion. */
- private static final double DFLT_MEMORY_POLICY_FRACTION = 0.2;
-
- /** Default memory policy's size is 20% of physical memory available on current machine. */
- public static final long DFLT_MEMORY_POLICY_MAX_SIZE = Math.max(
- (long)(DFLT_MEMORY_POLICY_FRACTION * U.getTotalMemoryAvailable()),
- DFLT_MEMORY_POLICY_INITIAL_SIZE);
-
- /** Default initial size of a memory chunk for the system cache (40 MB). */
- private static final long DFLT_SYS_CACHE_INIT_SIZE = 40L * 1024 * 1024;
-
- /** Default max size of a memory chunk for the system cache (100 MB). */
- private static final long DFLT_SYS_CACHE_MAX_SIZE = 100L * 1024 * 1024;
-
- /** Default memory page size. */
- public static final int DFLT_PAGE_SIZE = 4 * 1024;
-
- /** This name is assigned to default DataRegion if no user-defined default MemPlc is specified */
- public static final String DFLT_MEM_PLC_DEFAULT_NAME = "default";
-
- /** Size of a memory chunk reserved for system cache initially. */
- private long sysCacheInitSize = DFLT_SYS_CACHE_INIT_SIZE;
-
- /** Maximum size of system cache. */
- private long sysCacheMaxSize = DFLT_SYS_CACHE_MAX_SIZE;
-
- /** Memory page size. */
- private int pageSize;
-
- /** Concurrency level. */
- private int concLvl;
-
- /** A name of the memory policy that defines the default memory region. */
- private String dfltMemPlcName = DFLT_MEM_PLC_DEFAULT_NAME;
-
- /** Size of memory (in bytes) to use for default DataRegion. */
- private long dfltMemPlcSize = DFLT_MEMORY_POLICY_MAX_SIZE;
-
- /** Memory policies. */
- private MemoryPolicyConfiguration[] memPlcs;
-
- /**
- * Initial size of a memory region reserved for system cache.
- *
- * @return Size in bytes.
- */
- public long getSystemCacheInitialSize() {
- return sysCacheInitSize;
- }
-
- /**
- * Sets initial size of a memory region reserved for system cache.
- *
- * Default value is {@link #DFLT_SYS_CACHE_INIT_SIZE}
- *
- * @param sysCacheInitSize Size in bytes.
- *
- * @return {@code this} for chaining.
- */
- public MemoryConfiguration setSystemCacheInitialSize(long sysCacheInitSize) {
- A.ensure(sysCacheInitSize > 0, "System cache initial size can not be less zero.");
-
- this.sysCacheInitSize = sysCacheInitSize;
-
- return this;
- }
-
- /**
- * Maximum memory region size reserved for system cache.
- *
- * @return Size in bytes.
- */
- public long getSystemCacheMaxSize() {
- return sysCacheMaxSize;
- }
-
- /**
- * Sets maximum memory region size reserved for system cache. The total size should not be less than 10 MB
- * due to internal data structures overhead.
- *
- * @param sysCacheMaxSize Maximum size in bytes for system cache memory region.
- *
- * @return {@code this} for chaining.
- */
- public MemoryConfiguration setSystemCacheMaxSize(long sysCacheMaxSize) {
- A.ensure(sysCacheMaxSize > 0, "System cache max size can not be less zero.");
-
- this.sysCacheMaxSize = sysCacheMaxSize;
-
- return this;
- }
-
- /**
- * The pages memory consists of one or more expandable memory regions defined by {@link MemoryPolicyConfiguration}.
- * Every memory region is split on pages of fixed size that store actual cache entries.
- *
- * @return Page size in bytes.
- */
- public int getPageSize() {
- return pageSize;
- }
-
- /**
- * Changes the page size.
- *
- * Default value is {@link #DFLT_PAGE_SIZE}
- *
- * @param pageSize Page size in bytes.
- * @return {@code this} for chaining.
- */
- public MemoryConfiguration setPageSize(int pageSize) {
- A.ensure(pageSize >= 1024 && pageSize <= 16 * 1024, "Page size must be between 1kB and 16kB.");
- A.ensure(U.isPow2(pageSize), "Page size must be a power of 2.");
-
- this.pageSize = pageSize;
-
- return this;
- }
-
- /**
- * Gets an array of all memory policies configured. Apache Ignite will instantiate a dedicated memory region per
- * policy. An Apache Ignite cache can be mapped to a specific policy with
- * {@link CacheConfiguration#setMemoryPolicyName(String)} method.
- *
- * @return Array of configured memory policies.
- */
- public MemoryPolicyConfiguration[] getMemoryPolicies() {
- return memPlcs;
- }
-
- /**
- * Sets memory policies configurations.
- *
- * @param memPlcs Memory policies configurations.
- * @return {@code this} for chaining.
- */
- public MemoryConfiguration setMemoryPolicies(MemoryPolicyConfiguration... memPlcs) {
- this.memPlcs = memPlcs;
-
- return this;
- }
-
- /**
- * Creates a configuration for the default memory policy that will instantiate the default memory region.
- * To override settings of the default memory policy in order to create the default memory region with different
- * parameters, create own memory policy first, pass it to
- * {@link MemoryConfiguration#setMemoryPolicies(MemoryPolicyConfiguration...)} method and change the name of the
- * default memory policy with {@link MemoryConfiguration#setDefaultMemoryPolicyName(String)}.
- *
- * @return default Memory policy configuration.
- */
- public MemoryPolicyConfiguration createDefaultPolicyConfig() {
- MemoryPolicyConfiguration memPlc = new MemoryPolicyConfiguration();
-
- long maxSize = dfltMemPlcSize;
-
- if (maxSize < DFLT_MEMORY_POLICY_INITIAL_SIZE)
- memPlc.setInitialSize(maxSize);
- else
- memPlc.setInitialSize(DFLT_MEMORY_POLICY_INITIAL_SIZE);
-
- memPlc.setMaxSize(maxSize);
-
- return memPlc;
- }
-
- /**
- * Returns the number of concurrent segments in Ignite internal page mapping tables. By default equals
- * to the number of available CPUs multiplied by 4.
- *
- * @return Mapping table concurrency level.
- */
- public int getConcurrencyLevel() {
- return concLvl;
- }
-
- /**
- * Sets the number of concurrent segments in Ignite internal page mapping tables.
- *
- * @param concLvl Mapping table concurrency level.
- * @return {@code this} for chaining.
- */
- public MemoryConfiguration setConcurrencyLevel(int concLvl) {
- this.concLvl = concLvl;
-
- return this;
- }
-
- /**
- * Gets a size for default memory policy overridden by user.
- *
- * @return Default memory policy size overridden by user or {@link #DFLT_MEMORY_POLICY_MAX_SIZE} if nothing was specified.
- */
- public long getDefaultMemoryPolicySize() {
- return dfltMemPlcSize;
- }
-
- /**
- * Overrides size of default memory policy which is created automatically.
- *
- * If user doesn't specify any memory policy configuration, a default one with default size
- * (20% of available RAM) is created by Ignite.
- *
- * This property allows user to specify desired size of default memory policy
- * without having to use more verbose syntax of MemoryPolicyConfiguration elements.
- *
- * @param dfltMemPlcSize Size of default memory policy overridden by user.
- * @return {@code this} for chaining.
- */
- public MemoryConfiguration setDefaultMemoryPolicySize(long dfltMemPlcSize) {
- this.dfltMemPlcSize = dfltMemPlcSize;
-
- return this;
- }
-
- /**
- * Gets a name of default memory policy.
- *
- * @return A name of a custom memory policy configured with {@code MemoryConfiguration} or {@code null} of the
- * default policy is used.
- */
- public String getDefaultMemoryPolicyName() {
- return dfltMemPlcName;
- }
-
- /**
- * Sets the name for the default memory policy that will initialize the default memory region.
- * To set own default memory policy, create the policy first, pass it to
- * {@link MemoryConfiguration#setMemoryPolicies(MemoryPolicyConfiguration...)} method and change the name of the
- * default memory policy with {@code MemoryConfiguration#setDefaultMemoryPolicyName(String)}.
- *
- * If nothing is specified by user, it is set to {@link #DFLT_MEM_PLC_DEFAULT_NAME} value.
- *
- * @param dfltMemPlcName Name of a memory policy to be used as default one.
- * @return {@code this} for chaining.
- */
- public MemoryConfiguration setDefaultMemoryPolicyName(String dfltMemPlcName) {
- this.dfltMemPlcName = dfltMemPlcName;
-
- return this;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(MemoryConfiguration.class, this);
- }
-}
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
deleted file mode 100644
index f3c8ebb881b..00000000000
--- a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.configuration;
-
-import java.io.Serializable;
-import org.apache.ignite.MemoryMetrics;
-import org.apache.ignite.internal.mem.IgniteOutOfMemoryException;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.mxbean.MetricsMxBean;
-
-import static org.apache.ignite.configuration.MemoryConfiguration.DFLT_MEM_PLC_DEFAULT_NAME;
-
-/**
- * This class allows defining custom memory policies' configurations with various parameters for Apache Ignite
- * page memory (see {@link MemoryConfiguration}. For each configured memory policy Apache Ignite instantiates
- * respective memory regions with different parameters like maximum size, eviction policy, swapping options, etc.
- * An Apache Ignite cache can be mapped to a particular policy using
- * {@link CacheConfiguration#setMemoryPolicyName(String)} method.
- * <p>Sample configuration below shows how to configure several memory policies:</p>
- * <pre>
- * {@code
- * <property name="memoryConfiguration">
- * <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- * <property name="defaultMemoryPolicyName" value="Default_Region"/>
- * <property name="pageSize" value="4096"/>
- *
- * <property name="memoryPolicies">
- * <list>
- * <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- * <property name="name" value="Default_Region"/>
- * <property name="initialSize" value="#{100L * 1024 * 1024}"/>
- * </bean>
- *
- * <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- * <property name="name" value="20MB_Region_Eviction"/>
- * <property name="initialSize" value="#{20L * 1024 * 1024}"/>
- * <property name="pageEvictionMode" value="RANDOM_2_LRU"/>
- * </bean>
- *
- * <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- * <property name="name" value="25MB_Region_Swapping"/>
- * <property name="initialSize" value="#{25L * 1024 * 1024}"/>
- * <property name="maxSize" value="#{100L * 1024 * 1024}"/>
- * <property name="swapFilePath" value="memoryPolicyExampleSwap"/>
- * </bean>
- * </list>
- * </property>
- * }
- * </pre>
- *
- * @deprecated Use {@link DataRegionConfiguration} instead.
- */
-@Deprecated
-public final class MemoryPolicyConfiguration implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Default metrics enabled flag. */
- public static final boolean DFLT_METRICS_ENABLED = false;
-
- /** Default amount of sub intervals to calculate {@link MemoryMetrics#getAllocationRate()} metric. */
- public static final int DFLT_SUB_INTERVALS = 5;
-
- /** Default length of interval over which {@link MemoryMetrics#getAllocationRate()} metric is calculated. */
- public static final int DFLT_RATE_TIME_INTERVAL_MILLIS = 60_000;
-
- /** Memory policy name. */
- private String name = DFLT_MEM_PLC_DEFAULT_NAME;
-
- /** Memory policy start size. */
- private long initialSize;
-
- /** Memory policy maximum size. */
- private long maxSize = MemoryConfiguration.DFLT_MEMORY_POLICY_MAX_SIZE;
-
- /** An optional path to a memory mapped file for this memory policy. */
- private String swapFilePath;
-
- /** An algorithm for memory pages eviction. */
- private DataPageEvictionMode pageEvictionMode = DataPageEvictionMode.DISABLED;
-
- /**
- * A threshold for memory pages eviction initiation. For instance, if the threshold is 0.9 it means that the page
- * memory will start the eviction only after 90% memory region (defined by this policy) is occupied.
- */
- private double evictionThreshold = 0.9;
-
- /** Minimum number of empty pages in reuse lists. */
- private int emptyPagesPoolSize = 100;
-
- /**
- * Flag to enable the memory metrics collection for this memory policy.
- */
- private boolean metricsEnabled = DFLT_METRICS_ENABLED;
-
- /** Number of sub-intervals the whole {@link #setRateTimeInterval(long)} will be split into to calculate
- * {@link MemoryMetrics#getAllocationRate()} and {@link MemoryMetrics#getEvictionRate()} rates (5 by default).
- * <p>
- * Setting it to a bigger value will result in more precise calculation and smaller drops of
- * {@link MemoryMetrics#getAllocationRate()} metric when next sub-interval has to be recycled but introduces bigger
- * calculation overhead. */
- private int subIntervals = DFLT_SUB_INTERVALS;
-
- /**
- * Time interval (in milliseconds) for {@link MemoryMetrics#getAllocationRate()}
- * and {@link MemoryMetrics#getEvictionRate()} monitoring purposes.
- * <p>
- * For instance, after setting the interval to 60_000 milliseconds, subsequent calls to {@link MemoryMetrics#getAllocationRate()}
- * will return average allocation rate (pages per second) for the last minute.
- */
- private long rateTimeInterval = DFLT_RATE_TIME_INTERVAL_MILLIS;
-
- /**
- * Gets memory policy name.
- *
- * @return Memory policy name.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets memory policy name. The name must be non empty and must not be equal to the reserved 'sysMemPlc' one.
- *
- * If not specified, {@link MemoryConfiguration#DFLT_MEM_PLC_DEFAULT_NAME} value is used.
- *
- * @param name Memory policy name.
- * @return {@code this} for chaining.
- */
- public MemoryPolicyConfiguration setName(String name) {
- this.name = name;
-
- return this;
- }
-
- /**
- * Maximum memory region size defined by this memory policy. If the whole data can not fit into the memory region
- * an out of memory exception will be thrown.
- *
- * @return Size in bytes.
- */
- public long getMaxSize() {
- return maxSize;
- }
-
- /**
- * Sets maximum memory region size defined by this memory policy. The total size should not be less than 10 MB
- * due to the internal data structures overhead.
- *
- * @param maxSize Maximum memory policy size in bytes.
- * @return {@code this} for chaining.
- */
- public MemoryPolicyConfiguration setMaxSize(long maxSize) {
- this.maxSize = maxSize;
-
- return this;
- }
-
- /**
- * Gets initial memory region size defined by this memory policy. When the used memory size exceeds this value,
- * new chunks of memory will be allocated.
- *
- * @return Memory policy start size.
- */
- public long getInitialSize() {
- return initialSize;
- }
-
- /**
- * Sets initial memory region size defined by this memory policy. When the used memory size exceeds this value,
- * new chunks of memory will be allocated.
- *
- * @param initialSize Memory policy initial size.
- * @return {@code this} for chaining.
- */
- public MemoryPolicyConfiguration setInitialSize(long initialSize) {
- this.initialSize = initialSize;
-
- return this;
- }
-
- /**
- * A path to the memory-mapped files the memory region defined by this memory policy will be mapped to. Having
- * the path set, allows relying on swapping capabilities of an underlying operating system for the memory region.
- *
- * @return A path to the memory-mapped files or {@code null} if this feature is not used for the memory region
- * defined by this memory policy.
- */
- public String getSwapFilePath() {
- return swapFilePath;
- }
-
- /**
- * Sets a path to the memory-mapped file.
- *
- * @param swapFilePath A Path to the memory mapped file.
- * @return {@code this} for chaining.
- */
- public MemoryPolicyConfiguration setSwapFilePath(String swapFilePath) {
- this.swapFilePath = swapFilePath;
-
- return this;
- }
-
- /**
- * Gets memory pages eviction mode. If {@link DataPageEvictionMode#DISABLED} is used (default) then an out of
- * memory exception will be thrown if the memory region usage, defined by this memory policy, goes beyond its
- * capacity which is {@link #getMaxSize()}.
- *
- * @return Memory pages eviction algorithm. {@link DataPageEvictionMode#DISABLED} used by default.
- */
- public DataPageEvictionMode getPageEvictionMode() {
- return pageEvictionMode;
- }
-
- /**
- * Sets memory pages eviction mode.
- *
- * @param evictionMode Eviction mode.
- * @return {@code this} for chaining.
- */
- public MemoryPolicyConfiguration setPageEvictionMode(DataPageEvictionMode evictionMode) {
- pageEvictionMode = evictionMode;
-
- return this;
- }
-
- /**
- * Gets a threshold for memory pages eviction initiation. For instance, if the threshold is 0.9 it means that the
- * page memory will start the eviction only after 90% of the memory region (defined by this policy) is occupied.
- *
- * @return Memory pages eviction threshold.
- */
- public double getEvictionThreshold() {
- return evictionThreshold;
- }
-
- /**
- * Sets memory pages eviction threshold.
- *
- * @param evictionThreshold Eviction threshold.
- * @return {@code this} for chaining.
- */
- public MemoryPolicyConfiguration setEvictionThreshold(double evictionThreshold) {
- this.evictionThreshold = evictionThreshold;
-
- return this;
- }
-
- /**
- * Specifies the minimal number of empty pages to be present in reuse lists for this memory policy.
- * This parameter ensures that Ignite will be able to successfully evict old data entries when the size of
- * (key, value) pair is slightly larger than page size / 2.
- * Increase this parameter if cache can contain very big entries (total size of pages in this pool should be enough
- * to contain largest cache entry).
- * Increase this parameter if {@link IgniteOutOfMemoryException} occurred with enabled page eviction.
- *
- * @return Minimum number of empty pages in reuse list.
- */
- public int getEmptyPagesPoolSize() {
- return emptyPagesPoolSize;
- }
-
- /**
- * Specifies the minimal number of empty pages to be present in reuse lists for this memory policy.
- * This parameter ensures that Ignite will be able to successfully evict old data entries when the size of
- * (key, value) pair is slightly larger than page size / 2.
- * Increase this parameter if cache can contain very big entries (total size of pages in this pool should be enough
- * to contain largest cache entry).
- * Increase this parameter if {@link IgniteOutOfMemoryException} occurred with enabled page eviction.
- *
- * @param emptyPagesPoolSize Empty pages pool size.
- * @return {@code this} for chaining.
- */
- public MemoryPolicyConfiguration setEmptyPagesPoolSize(int emptyPagesPoolSize) {
- this.emptyPagesPoolSize = emptyPagesPoolSize;
-
- return this;
- }
-
- /**
- * Gets whether memory metrics are enabled by default on node startup.
- *
- * @return Metrics enabled flag.
- */
- public boolean isMetricsEnabled() {
- return metricsEnabled;
- }
-
- /**
- * Sets memory metrics enabled flag. If this flag is {@code true}, metrics will be enabled on node startup.
- *
- * @param metricsEnabled Metrics enabled flag.
- * @return {@code this} for chaining.
- */
- public MemoryPolicyConfiguration setMetricsEnabled(boolean metricsEnabled) {
- this.metricsEnabled = metricsEnabled;
-
- return this;
- }
-
- /**
- * Gets time interval for {@link MemoryMetrics#getAllocationRate()}
- * and {@link MemoryMetrics#getEvictionRate()} monitoring purposes.
- * <p>
- * For instance, after setting the interval to 60_000 milliseconds,
- * subsequent calls to {@link MemoryMetrics#getAllocationRate()}
- * will return average allocation rate (pages per second) for the last minute.
- *
- * @return Time interval over which allocation rate is calculated.
- * @deprecated Use {@link MetricsMxBean#configureHitRateMetric(String, long)} instead.
- */
- @Deprecated
- public long getRateTimeInterval() {
- return rateTimeInterval;
- }
-
- /**
- * Sets time interval for {@link MemoryMetrics#getAllocationRate()}
- * and {@link MemoryMetrics#getEvictionRate()} monitoring purposes.
- * <p>
- * For instance, after setting the interval to 60 seconds,
- * subsequent calls to {@link MemoryMetrics#getAllocationRate()}
- * will return average allocation rate (pages per second) for the last minute.
- *
- * @param rateTimeInterval Time interval used for allocation and eviction rates calculations.
- * @return {@code this} for chaining.
- * @deprecated Use {@link MetricsMxBean#configureHitRateMetric(String, long)} instead.
- */
- @Deprecated
- public MemoryPolicyConfiguration setRateTimeInterval(long rateTimeInterval) {
- this.rateTimeInterval = rateTimeInterval;
-
- return this;
- }
-
- /**
- * Gets a number of sub-intervals the whole {@link #setRateTimeInterval(long)}
- * will be split into to calculate {@link MemoryMetrics#getAllocationRate()}
- * and {@link MemoryMetrics#getEvictionRate()} rates (5 by default).
- * <p>
- * Setting it to a bigger value will result in more precise calculation and smaller drops of
- * {@link MemoryMetrics#getAllocationRate()} metric when next sub-interval has to be recycled but introduces bigger
- * calculation overhead.
- *
- * @return number of sub intervals.
- * @deprecated Use {@link MetricsMxBean#configureHitRateMetric(String, long)} instead.
- */
- @Deprecated
- public int getSubIntervals() {
- return subIntervals;
- }
-
- /**
- * Sets a number of sub-intervals the whole {@link #setRateTimeInterval(long)} will be split into to calculate
- * {@link MemoryMetrics#getAllocationRate()} and {@link MemoryMetrics#getEvictionRate()} rates (5 by default).
- * <p>
- * Setting it to a bigger value will result in more precise calculation and smaller drops of
- * {@link MemoryMetrics#getAllocationRate()} metric when next sub-interval has to be recycled but introduces bigger
- * calculation overhead.
- *
- * @param subIntervals A number of sub-intervals.
- * @return {@code this} for chaining.
- * @deprecated Use {@link MetricsMxBean#configureHitRateMetric(String, long)} instead.
- */
- @Deprecated
- public MemoryPolicyConfiguration setSubIntervals(int subIntervals) {
- this.subIntervals = subIntervals;
-
- return this;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(MemoryPolicyConfiguration.class, this);
- }
-}
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/PersistentStoreConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/PersistentStoreConfiguration.java
deleted file mode 100644
index 947b3478e82..00000000000
--- a/modules/core/src/main/java/org/apache/ignite/configuration/PersistentStoreConfiguration.java
+++ /dev/null
@@ -1,690 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.configuration;
-
-import java.io.Serializable;
-import org.apache.ignite.IgniteSystemProperties;
-import org.apache.ignite.internal.processors.cache.persistence.file.AsyncFileIOFactory;
-import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory;
-import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.mxbean.MetricsMxBean;
-
-/**
- * Configures Apache Ignite Persistent store.
- * @deprecated Use {@link DataStorageConfiguration} instead.
- */
-@Deprecated
-public class PersistentStoreConfiguration implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** */
- public static final int DFLT_CHECKPOINTING_FREQ = 180000;
-
- /** Lock default wait time, 10 sec. */
- public static final int DFLT_LOCK_WAIT_TIME = 10 * 1000;
-
- /** */
- public static final boolean DFLT_METRICS_ENABLED = false;
-
- /** Default amount of sub intervals to calculate rate-based metric. */
- public static final int DFLT_SUB_INTERVALS = 5;
-
- /** Default length of interval over which rate-based metric is calculated. */
- public static final int DFLT_RATE_TIME_INTERVAL_MILLIS = 60_000;
-
- /** Default number of checkpointing threads. */
- public static final int DFLT_CHECKPOINTING_THREADS = 4;
-
- /** Default checkpoint write order. */
- public static final CheckpointWriteOrder DFLT_CHECKPOINT_WRITE_ORDER = CheckpointWriteOrder.SEQUENTIAL;
-
- /** Default number of checkpoints to be kept in WAL after checkpoint is finished */
- public static final int DFLT_WAL_HISTORY_SIZE = 20;
-
- /** */
- public static final int DFLT_WAL_SEGMENTS = 10;
-
- /** Default WAL file segment size, 64MBytes */
- public static final int DFLT_WAL_SEGMENT_SIZE = 64 * 1024 * 1024;
-
- /** Default wal mode. */
- public static final WALMode DFLT_WAL_MODE = WALMode.LOG_ONLY;
-
- /** Default Wal flush frequency. */
- public static final int DFLT_WAL_FLUSH_FREQ = 2000;
-
- /** Default wal fsync delay. */
- public static final int DFLT_WAL_FSYNC_DELAY = 1000;
-
- /** Default wal record iterator buffer size. */
- public static final int DFLT_WAL_RECORD_ITERATOR_BUFFER_SIZE = 64 * 1024 * 1024;
-
- /** Default wal always write full pages. */
- public static final boolean DFLT_WAL_ALWAYS_WRITE_FULL_PAGES = false;
-
- /** Default write throttling enabled. */
- public static final boolean DFLT_WRITE_THROTTLING_ENABLED = false;
-
- /** */
- private String persistenceStorePath;
-
- /** Checkpointing frequency. */
- private long checkpointingFreq = DFLT_CHECKPOINTING_FREQ;
-
- /** Lock wait time, in milliseconds. */
- private long lockWaitTime = DFLT_LOCK_WAIT_TIME;
-
- /** */
- private long checkpointingPageBufSize;
-
- /** */
- private int checkpointingThreads = DFLT_CHECKPOINTING_THREADS;
-
- /** Checkpoint write order. */
- private CheckpointWriteOrder checkpointWriteOrder = DFLT_CHECKPOINT_WRITE_ORDER;
-
- /** Number of checkpoints to keep */
- private int walHistSize = DFLT_WAL_HISTORY_SIZE;
-
- /** Number of work WAL segments. */
- private int walSegments = DFLT_WAL_SEGMENTS;
-
- /** Size of one WAL segment in bytes. 64 Mb is used by default. Maximum value is 2Gb */
- private int walSegmentSize = DFLT_WAL_SEGMENT_SIZE;
-
- /** Directory where WAL is stored (work directory) */
- private String walStorePath = DataStorageConfiguration.DFLT_WAL_PATH;
-
- /** WAL archive path. */
- private String walArchivePath = DataStorageConfiguration.DFLT_WAL_ARCHIVE_PATH;
-
- /** Metrics enabled flag. */
- private boolean metricsEnabled = DFLT_METRICS_ENABLED;
-
- /** Wal mode. */
- private WALMode walMode = DFLT_WAL_MODE;
-
- /** WAl buffer size. */
- private int walBuffSize/* = DFLT_WAL_BUFF_SIZE*/;
-
- /** Wal flush frequency in milliseconds. */
- private long walFlushFreq = DFLT_WAL_FLUSH_FREQ;
-
- /** Wal fsync delay. */
- private long walFsyncDelay = DFLT_WAL_FSYNC_DELAY;
-
- /** Wal record iterator buffer size. */
- private int walRecordIterBuffSize = DFLT_WAL_RECORD_ITERATOR_BUFFER_SIZE;
-
- /** Always write full pages. */
- private boolean alwaysWriteFullPages = DFLT_WAL_ALWAYS_WRITE_FULL_PAGES;
-
- /** Factory to provide I/O interface for files */
- private FileIOFactory fileIOFactory =
- IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_USE_ASYNC_FILE_IO_FACTORY, false) ?
- new AsyncFileIOFactory() : new RandomAccessFileIOFactory();
-
- /**
- * Number of sub-intervals the whole {@link #setRateTimeInterval(long)} will be split into to calculate
- * rate-based metrics.
- * <p>
- * Setting it to a bigger value will result in more precise calculation and smaller drops of
- * rate-based metrics when next sub-interval has to be recycled but introduces bigger
- * calculation overhead.
- */
- private int subIntervals = DFLT_SUB_INTERVALS;
-
- /** Time interval (in milliseconds) for rate-based metrics. */
- private long rateTimeInterval = DFLT_RATE_TIME_INTERVAL_MILLIS;
-
- /**
- * Time interval (in milliseconds) for running auto archiving for incompletely WAL segment
- */
- private long walAutoArchiveAfterInactivity = -1;
-
- /**
- * If true, threads that generate dirty pages too fast during ongoing checkpoint will be throttled.
- */
- private boolean writeThrottlingEnabled = DFLT_WRITE_THROTTLING_ENABLED;
-
- /**
- * @return Path the root directory where the Persistent Store will persist data and indexes.
- */
- public String getPersistentStorePath() {
- return persistenceStorePath;
- }
-
- /**
- * Sets a path to the root directory where the Persistent Store will persist data and indexes.
- * By default the Persistent Store's files are located under Ignite work directory.
- *
- * @param persistenceStorePath Persistence store path.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setPersistentStorePath(String persistenceStorePath) {
- this.persistenceStorePath = persistenceStorePath;
-
- return this;
- }
-
- /**
- * Gets checkpointing frequency.
- *
- * @return checkpointing frequency in milliseconds.
- */
- public long getCheckpointingFrequency() {
- return checkpointingFreq <= 0 ? DFLT_CHECKPOINTING_FREQ : checkpointingFreq;
- }
-
- /**
- * Sets the checkpointing frequency which is a minimal interval when the dirty pages will be written
- * to the Persistent Store. If the rate is high, checkpointing will be triggered more frequently.
- *
- * @param checkpointingFreq checkpointing frequency in milliseconds.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setCheckpointingFrequency(long checkpointingFreq) {
- this.checkpointingFreq = checkpointingFreq;
-
- return this;
- }
-
- /**
- * Gets amount of memory allocated for a checkpointing temporary buffer.
- *
- * @return Checkpointing page buffer size in bytes or {@code 0} for Ignite
- * to choose the buffer size automatically.
- */
- public long getCheckpointingPageBufferSize() {
- return checkpointingPageBufSize;
- }
-
- /**
- * Sets amount of memory allocated for the checkpointing temporary buffer. The buffer is used to create temporary
- * copies of pages that are being written to disk and being update in parallel while the checkpointing is in
- * progress.
- *
- * @param checkpointingPageBufSize Checkpointing page buffer size in bytes or {@code 0} for Ignite to
- * choose the buffer size automatically.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setCheckpointingPageBufferSize(long checkpointingPageBufSize) {
- this.checkpointingPageBufSize = checkpointingPageBufSize;
-
- return this;
- }
-
- /**
- * Gets a number of threads to use for the checkpointing purposes.
- *
- * @return Number of checkpointing threads.
- */
- public int getCheckpointingThreads() {
- return checkpointingThreads;
- }
-
- /**
- * Sets a number of threads to use for the checkpointing purposes.
- *
- * @param checkpointingThreads Number of checkpointing threads. Four threads are used by default.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setCheckpointingThreads(int checkpointingThreads) {
- this.checkpointingThreads = checkpointingThreads;
-
- return this;
- }
-
- /**
- * Time out in milliseonds to wait when acquiring persistence store lock file before failing the
- * local node.
- *
- * @return Lock wait time in milliseconds.
- */
- public long getLockWaitTime() {
- return lockWaitTime;
- }
-
- /**
- * Time out in milliseconds to wait when acquiring persistence store lock file before failing the
- * local node.
- *
- * @param lockWaitTime Lock wait time in milliseconds.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setLockWaitTime(long lockWaitTime) {
- this.lockWaitTime = lockWaitTime;
-
- return this;
- }
-
- /**
- * Gets a total number of checkpoints to keep in the WAL history.
- *
- * @return Number of checkpoints to keep in WAL after a checkpoint is finished.
- */
- public int getWalHistorySize() {
- return walHistSize <= 0 ? DFLT_WAL_HISTORY_SIZE : walHistSize;
- }
-
- /**
- * Sets a total number of checkpoints to keep in the WAL history.
- *
- * @param walHistSize Number of checkpoints to keep after a checkpoint is finished.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWalHistorySize(int walHistSize) {
- this.walHistSize = walHistSize;
-
- return this;
- }
-
- /**
- * Gets a number of WAL segments to work with.
- *
- * @return Number of work WAL segments.
- */
- public int getWalSegments() {
- return walSegments <= 0 ? DFLT_WAL_SEGMENTS : walSegments;
- }
-
- /**
- * Sets a number of WAL segments to work with. For performance reasons,
- * the whole WAL is split into files of fixed length called segments.
- *
- * @param walSegments Number of WAL segments.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWalSegments(int walSegments) {
- this.walSegments = walSegments;
-
- return this;
- }
-
- /**
- * Gets size of a WAL segment in bytes.
- *
- * @return WAL segment size.
- */
- public int getWalSegmentSize() {
- return walSegmentSize <= 0 ? DFLT_WAL_SEGMENT_SIZE : walSegmentSize;
- }
-
- /**
- * Sets size of a WAL segment.
- *
- * @param walSegmentSize WAL segment size. 64 MB is used by default. Maximum value is 2Gb
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWalSegmentSize(int walSegmentSize) {
- this.walSegmentSize = walSegmentSize;
-
- return this;
- }
-
- /**
- * Gets a path to the directory where WAL is stored.
- *
- * @return WAL persistence path, absolute or relative to Ignite work directory.
- */
- public String getWalStorePath() {
- return walStorePath;
- }
-
- /**
- * Sets a path to the directory where WAL is stored . If this path is relative, it will be resolved
- * relatively to Ignite work directory.
- *
- * @param walStorePath WAL persistence path, absolute or relative to Ignite work directory.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWalStorePath(String walStorePath) {
- this.walStorePath = walStorePath;
-
- return this;
- }
-
- /**
- * Gets a path to the WAL archive directory.
- *
- * @return WAL archive directory.
- */
- public String getWalArchivePath() {
- return walArchivePath;
- }
-
- /**
- * Sets a path for the WAL archive directory. Every WAL segment will be fully copied to this directory before
- * it can be reused for WAL purposes.
- *
- * @param walArchivePath WAL archive directory.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWalArchivePath(String walArchivePath) {
- this.walArchivePath = walArchivePath;
-
- return this;
- }
-
- /**
- * Gets flag indicating whether persistence metrics collection is enabled.
- * Default value is {@link #DFLT_METRICS_ENABLED}.
- *
- * @return Metrics enabled flag.
- */
- public boolean isMetricsEnabled() {
- return metricsEnabled;
- }
-
- /**
- * Sets flag indicating whether persistence metrics collection is enabled.
- *
- * @param metricsEnabled Metrics enabled flag.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setMetricsEnabled(boolean metricsEnabled) {
- this.metricsEnabled = metricsEnabled;
-
- return this;
- }
-
- /**
- * @return Flag indicating whether write throttling is enabled.
- */
- public boolean isWriteThrottlingEnabled() {
- return writeThrottlingEnabled;
- }
-
- /**
- * Sets flag indicating whether write throttling is enabled.
- *
- * @param writeThrottlingEnabled Write throttling enabled flag.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWriteThrottlingEnabled(boolean writeThrottlingEnabled) {
- this.writeThrottlingEnabled = writeThrottlingEnabled;
-
- return this;
- }
-
- /**
- * Gets the length of the time interval for rate-based metrics. This interval defines a window over which
- * hits will be tracked. Default value is {@link #DFLT_RATE_TIME_INTERVAL_MILLIS}.
- *
- * @return Time interval in milliseconds.
- * @deprecated Use {@link MetricsMxBean#configureHitRateMetric(String, long)} instead.
- */
- @Deprecated
- public long getRateTimeInterval() {
- return rateTimeInterval;
- }
-
- /**
- * Sets the length of the time interval for rate-based metrics. This interval defines a window over which
- * hits will be tracked.
- *
- * @param rateTimeInterval Time interval in milliseconds.
- * @return {@code this} for chaining.
- * @deprecated Use {@link MetricsMxBean#configureHitRateMetric(String, long)} instead.
- */
- @Deprecated
- public PersistentStoreConfiguration setRateTimeInterval(long rateTimeInterval) {
- this.rateTimeInterval = rateTimeInterval;
-
- return this;
- }
-
- /**
- * Gets the number of sub-intervals to split the {@link #getRateTimeInterval()} into to track the update history.
- * Default value is {@link #DFLT_SUB_INTERVALS}.
- *
- * @return The number of sub-intervals for history tracking.
- * @deprecated Use {@link MetricsMxBean#configureHitRateMetric(String, long)} instead.
- */
- @Deprecated
- public int getSubIntervals() {
- return subIntervals;
- }
-
- /**
- * Sets the number of sub-intervals to split the {@link #getRateTimeInterval()} into to track the update history.
- *
- * @param subIntervals The number of sub-intervals for history tracking.
- * @return {@code this} for chaining.
- * @deprecated Use {@link MetricsMxBean#configureHitRateMetric(String, long)} instead.
- */
- @Deprecated
- public PersistentStoreConfiguration setSubIntervals(int subIntervals) {
- this.subIntervals = subIntervals;
-
- return this;
- }
-
- /**
- * Type define behavior wal fsync.
- * Different type provide different guarantees for consistency.
- *
- * @return WAL mode.
- */
- public WALMode getWalMode() {
- return walMode == null ? DFLT_WAL_MODE : walMode;
- }
-
- /**
- * @param walMode Wal mode.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWalMode(WALMode walMode) {
- if (walMode == WALMode.DEFAULT)
- walMode = WALMode.FSYNC;
-
- this.walMode = walMode;
-
- return this;
- }
-
- /**
- * Property defines size of WAL buffer.
- * Each WAL record will be serialized to this buffer before write in WAL file.
- *
- * @return WAL buffer size.
- * @deprecated Instead {@link #getWalBufferSize()} should be used.
- */
- @Deprecated
- public int getTlbSize() {
- return getWalBufferSize();
- }
-
- /**
- * @param tlbSize WAL buffer size.
- * @return {@code this} for chaining.
- * @deprecated Instead {@link #setWalBufferSize(int walBuffSize)} should be used.
- */
- @Deprecated
- public PersistentStoreConfiguration setTlbSize(int tlbSize) {
- return setWalBufferSize(tlbSize);
- }
-
- /**
- * Property defines size of WAL buffer.
- * Each WAL record will be serialized to this buffer before write in WAL file.
- *
- * @return WAL buffer size.
- */
- @Deprecated
- public int getWalBufferSize() {
- return walBuffSize <= 0 ? getWalSegmentSize() / 4 : walBuffSize;
- }
-
- /**
- * @param walBuffSize WAL buffer size.
- * @return {@code this} for chaining.
- */
- @Deprecated
- public PersistentStoreConfiguration setWalBufferSize(int walBuffSize) {
- this.walBuffSize = walBuffSize;
-
- return this;
- }
-
- /**
- * This property define how often WAL will be fsync-ed in {@code BACKGROUND} mode. Ignored for
- * all other WAL modes.
- *
- * @return WAL flush frequency, in milliseconds.
- */
- public long getWalFlushFrequency() {
- return walFlushFreq;
- }
-
- /**
- * This property define how often WAL will be fsync-ed in {@code BACKGROUND} mode. Ignored for
- * all other WAL modes.
- *
- * @param walFlushFreq WAL flush frequency, in milliseconds.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWalFlushFrequency(long walFlushFreq) {
- this.walFlushFreq = walFlushFreq;
-
- return this;
- }
-
- /**
- * @return The fsync delay, in nanoseconds.
- */
- public long getWalFsyncDelayNanos() {
- return walFsyncDelay <= 0 ? DFLT_WAL_FSYNC_DELAY : walFsyncDelay;
- }
-
- /**
- * @param walFsyncDelayNanos Wal fsync delay, in nanoseconds.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWalFsyncDelayNanos(long walFsyncDelayNanos) {
- walFsyncDelay = walFsyncDelayNanos;
-
- return this;
- }
-
- /**
- * Property define how many bytes iterator read from
- * disk (for one reading), during go ahead wal.
- *
- * @return Record iterator buffer size.
- */
- public int getWalRecordIteratorBufferSize() {
- return walRecordIterBuffSize <= 0 ? DFLT_WAL_RECORD_ITERATOR_BUFFER_SIZE : walRecordIterBuffSize;
- }
-
- /**
- * @param walRecordIterBuffSize Wal record iterator buffer size.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setWalRecordIteratorBufferSize(int walRecordIterBuffSize) {
- this.walRecordIterBuffSize = walRecordIterBuffSize;
-
- return this;
- }
-
- /**
- * @return Whether full page must be always written.
- */
- public boolean isAlwaysWriteFullPages() {
- return alwaysWriteFullPages;
- }
-
- /**
- * @param alwaysWriteFullPages Always write full pages.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setAlwaysWriteFullPages(boolean alwaysWriteFullPages) {
- this.alwaysWriteFullPages = alwaysWriteFullPages;
-
- return this;
- }
-
- /**
- * Factory to provide implementation of FileIO interface
- * which is used for any file read/write operations
- *
- * @return File I/O factory
- */
- public FileIOFactory getFileIOFactory() {
- return fileIOFactory;
- }
-
- /**
- * @param fileIOFactory File I/O factory
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setFileIOFactory(FileIOFactory fileIOFactory) {
- this.fileIOFactory = fileIOFactory;
-
- return this;
- }
-
- /**
- * <b>Note:</b> setting this value with {@link WALMode#FSYNC} may generate file size overhead for WAL segments in case
- * grid is used rarely.
- *
- * @param walAutoArchiveAfterInactivity time in millis to run auto archiving segment (even if incomplete) after last
- * record logging. <br> Positive value enables incomplete segment archiving after timeout (inactivity). <br> Zero or
- * negative value disables auto archiving.
- * @return current configuration instance for chaining
- */
- public PersistentStoreConfiguration setWalAutoArchiveAfterInactivity(long walAutoArchiveAfterInactivity) {
- this.walAutoArchiveAfterInactivity = walAutoArchiveAfterInactivity;
-
- return this;
- }
-
- /**
- * @return time in millis to run auto archiving WAL segment (even if incomplete) after last record log
- */
- public long getWalAutoArchiveAfterInactivity() {
- return walAutoArchiveAfterInactivity;
- }
-
- /**
- * This property defines order of writing pages to disk storage during checkpoint.
- *
- * @return Checkpoint write order.
- */
- public CheckpointWriteOrder getCheckpointWriteOrder() {
- return checkpointWriteOrder;
- }
-
- /**
- * This property defines order of writing pages to disk storage during checkpoint.
- *
- * @param checkpointWriteOrder Checkpoint write order.
- * @return {@code this} for chaining.
- */
- public PersistentStoreConfiguration setCheckpointWriteOrder(CheckpointWriteOrder checkpointWriteOrder) {
- this.checkpointWriteOrder = checkpointWriteOrder;
-
- return this;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(PersistentStoreConfiguration.class, this);
- }
-}
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index e4dfba6d877..600e9810a37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -84,7 +84,6 @@ import org.apache.ignite.configuration.BinaryConfiguration;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.CollectionConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.events.EventType;
import org.apache.ignite.internal.binary.BinaryMarshaller;
@@ -254,7 +253,6 @@ import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MARSHALLER;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MARSHALLER_COMPACT_FOOTER;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MARSHALLER_USE_BINARY_STRING_SER_VER_2;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MARSHALLER_USE_DFLT_SUID;
-import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MEMORY_CONFIG;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_NODE_CONSISTENT_ID;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_PEER_CLASSLOADING;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_PREFIX;
@@ -1602,7 +1600,7 @@ public class IgniteKernal implements IgniteEx, Externalizable {
add(ATTR_REST_PORT_RANGE, cfg.getConnectorConfiguration().getPortRange());
// Save data storage configuration.
- addDataStorageConfigurationAttributes();
+ add(ATTR_DATA_STORAGE_CONFIG, ctx.marshallerContext().jdkMarshaller().marshal(cfg.getDataStorageConfiguration()));
// Save transactions configuration.
add(ATTR_TX_SERIALIZABLE_ENABLED, cfg.getTransactionConfiguration().isTxSerializableEnabled());
@@ -1636,25 +1634,6 @@ public class IgniteKernal implements IgniteEx, Externalizable {
}
}
- /**
- * @throws IgniteCheckedException If duplicated SPI name found.
- */
- private void addDataStorageConfigurationAttributes() throws IgniteCheckedException {
- MemoryConfiguration memCfg = cfg.getMemoryConfiguration();
-
- // Save legacy memory configuration if it's present.
- if (memCfg != null) {
- // Page size initialization is suspended, see IgniteCacheDatabaseSharedManager#checkPageSize.
- // We should copy initialized value from new configuration.
- memCfg.setPageSize(cfg.getDataStorageConfiguration().getPageSize());
-
- add(ATTR_MEMORY_CONFIG, memCfg);
- }
-
- // Save data storage configuration.
- add(ATTR_DATA_STORAGE_CONFIG, ctx.marshallerContext().jdkMarshaller().marshal(cfg.getDataStorageConfiguration()));
- }
-
/**
* Add SPI version and class attributes into node attributes.
*
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
index a5fc9270d40..d0425038af1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
@@ -183,10 +183,6 @@ public final class IgniteNodeAttributes {
/** */
public static final String ATTR_DATA_STREAMER_POOL_SIZE = ATTR_PREFIX + ".data.streamer.pool.size";
- /** Memory configuration. */
- @Deprecated
- public static final String ATTR_MEMORY_CONFIG = ATTR_PREFIX + ".memory";
-
/** Data storage configuration. */
public static final String ATTR_DATA_STORAGE_CONFIG = ATTR_PREFIX + ".data.storage.config";
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 2864009c84a..7f4529a6a19 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -61,15 +61,10 @@ import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.compute.ComputeJob;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.ConnectorConfiguration;
-import org.apache.ignite.configuration.DataRegionConfiguration;
import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.configuration.DeploymentMode;
import org.apache.ignite.configuration.ExecutorConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
-import org.apache.ignite.configuration.MemoryPolicyConfiguration;
-import org.apache.ignite.configuration.PersistentStoreConfiguration;
-import org.apache.ignite.configuration.SystemDataRegionConfiguration;
import org.apache.ignite.configuration.TransactionConfiguration;
import org.apache.ignite.failure.FailureContext;
import org.apache.ignite.failure.FailureType;
@@ -144,8 +139,6 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-import static org.apache.ignite.configuration.MemoryConfiguration.DFLT_MEMORY_POLICY_MAX_SIZE;
-import static org.apache.ignite.configuration.MemoryConfiguration.DFLT_MEM_PLC_DEFAULT_NAME;
import static org.apache.ignite.internal.IgniteComponentType.SPRING;
import static org.apache.ignite.internal.processors.task.TaskExecutionOptions.options;
import static org.apache.ignite.internal.util.IgniteUtils.EMPTY_STRS;
@@ -1946,12 +1939,6 @@ public class IgnitionEx {
DataStorageConfiguration dsCfg = cfg.getDataStorageConfiguration();
if (dsCfg != null) {
- if (cfg.getMemoryConfiguration() != null || cfg.getPersistentStoreConfiguration() != null) {
- throw new IgniteCheckedException("Data storage can be configured with either legacy " +
- "(MemoryConfiguration, PersistentStoreConfiguration) or new (DataStorageConfiguration) classes, " +
- "but not both.");
- }
-
List<String> extraStorages = F.asList(dsCfg.getExtraStoragePaths());
if (extraStorages.size() != new HashSet<>(extraStorages).size()
@@ -1974,9 +1961,6 @@ public class IgnitionEx {
}
}
- if (cfg.getMemoryConfiguration() != null || cfg.getPersistentStoreConfiguration() != null)
- convertLegacyDataStorageConfigurationToNew(cfg);
-
if (!cfg.isClientMode() && cfg.getDataStorageConfiguration() == null)
cfg.setDataStorageConfiguration(new DataStorageConfiguration());
}
@@ -2612,117 +2596,4 @@ public class IgnitionEx {
if (myCfg.getMBeanServer() == null && !IGNITE_MBEANS_DISABLED)
myCfg.setMBeanServer(ManagementFactory.getPlatformMBeanServer());
}
-
- /**
- * @param cfg Ignite Configuration with legacy data storage configuration.
- */
- private static void convertLegacyDataStorageConfigurationToNew(
- IgniteConfiguration cfg) throws IgniteCheckedException {
- PersistentStoreConfiguration psCfg = cfg.getPersistentStoreConfiguration();
-
- boolean persistenceEnabled = psCfg != null;
-
- DataStorageConfiguration dsCfg = new DataStorageConfiguration();
-
- MemoryConfiguration memCfg = cfg.getMemoryConfiguration() != null ?
- cfg.getMemoryConfiguration() : new MemoryConfiguration();
-
- dsCfg.setConcurrencyLevel(memCfg.getConcurrencyLevel());
- dsCfg.setPageSize(memCfg.getPageSize());
-
- dsCfg.setSystemDataRegionConfiguration(
- new SystemDataRegionConfiguration()
- .setInitialSize(memCfg.getSystemCacheInitialSize())
- .setMaxSize(memCfg.getSystemCacheMaxSize())
- );
-
- List<DataRegionConfiguration> optionalDataRegions = new ArrayList<>();
-
- boolean customDfltPlc = false;
-
- if (memCfg.getMemoryPolicies() != null) {
- for (MemoryPolicyConfiguration mpc : memCfg.getMemoryPolicies()) {
- DataRegionConfiguration region = new DataRegionConfiguration();
-
- region.setPersistenceEnabled(persistenceEnabled);
-
- if (mpc.getInitialSize() != 0L)
- region.setInitialSize(mpc.getInitialSize());
-
- region.setEmptyPagesPoolSize(mpc.getEmptyPagesPoolSize());
- region.setEvictionThreshold(mpc.getEvictionThreshold());
- region.setMaxSize(mpc.getMaxSize());
- region.setName(mpc.getName());
- region.setPageEvictionMode(mpc.getPageEvictionMode());
- region.setMetricsRateTimeInterval(mpc.getRateTimeInterval());
- region.setMetricsSubIntervalCount(mpc.getSubIntervals());
- region.setSwapPath(mpc.getSwapFilePath());
- region.setMetricsEnabled(mpc.isMetricsEnabled());
-
- if (persistenceEnabled)
- region.setCheckpointPageBufferSize(psCfg.getCheckpointingPageBufferSize());
-
- if (mpc.getName() == null) {
- throw new IgniteCheckedException(new IllegalArgumentException(
- "User-defined MemoryPolicyConfiguration must have non-null and non-empty name."));
- }
-
- if (mpc.getName().equals(memCfg.getDefaultMemoryPolicyName())) {
- customDfltPlc = true;
-
- dsCfg.setDefaultDataRegionConfiguration(region);
- }
- else
- optionalDataRegions.add(region);
- }
- }
-
- if (!optionalDataRegions.isEmpty())
- dsCfg.setDataRegionConfigurations(optionalDataRegions.toArray(
- new DataRegionConfiguration[optionalDataRegions.size()]));
-
- if (!customDfltPlc) {
- if (!DFLT_MEM_PLC_DEFAULT_NAME.equals(memCfg.getDefaultMemoryPolicyName())) {
- throw new IgniteCheckedException(new IllegalArgumentException("User-defined default MemoryPolicy " +
- "name must be presented among configured MemoryPolices: " + memCfg.getDefaultMemoryPolicyName()));
- }
-
- dsCfg.setDefaultDataRegionConfiguration(new DataRegionConfiguration()
- .setMaxSize(memCfg.getDefaultMemoryPolicySize())
- .setName(memCfg.getDefaultMemoryPolicyName())
- .setPersistenceEnabled(persistenceEnabled));
- }
- else {
- if (memCfg.getDefaultMemoryPolicySize() != DFLT_MEMORY_POLICY_MAX_SIZE)
- throw new IgniteCheckedException(new IllegalArgumentException("User-defined MemoryPolicy " +
- "configuration and defaultMemoryPolicySize properties are set at the same time."));
- }
-
- if (persistenceEnabled) {
- dsCfg.setCheckpointFrequency(psCfg.getCheckpointingFrequency());
- dsCfg.setCheckpointThreads(psCfg.getCheckpointingThreads());
- dsCfg.setCheckpointWriteOrder(psCfg.getCheckpointWriteOrder());
- dsCfg.setFileIOFactory(psCfg.getFileIOFactory());
- dsCfg.setLockWaitTime(psCfg.getLockWaitTime());
- dsCfg.setStoragePath(psCfg.getPersistentStorePath());
- dsCfg.setMetricsRateTimeInterval(psCfg.getRateTimeInterval());
- dsCfg.setMetricsSubIntervalCount(psCfg.getSubIntervals());
- dsCfg.setWalThreadLocalBufferSize(psCfg.getTlbSize());
- dsCfg.setWalArchivePath(psCfg.getWalArchivePath());
- dsCfg.setWalAutoArchiveAfterInactivity(psCfg.getWalAutoArchiveAfterInactivity());
- dsCfg.setWalFlushFrequency(psCfg.getWalFlushFrequency());
- dsCfg.setWalFsyncDelayNanos(psCfg.getWalFsyncDelayNanos());
- dsCfg.setWalHistorySize(psCfg.getWalHistorySize());
- dsCfg.setWalMode(psCfg.getWalMode());
- dsCfg.setWalRecordIteratorBufferSize(psCfg.getWalRecordIteratorBufferSize());
- dsCfg.setWalSegments(psCfg.getWalSegments());
- dsCfg.setWalSegmentSize(psCfg.getWalSegmentSize());
- dsCfg.setWalPath(psCfg.getWalStorePath());
- dsCfg.setAlwaysWriteFullPages(psCfg.isAlwaysWriteFullPages());
- dsCfg.setMetricsEnabled(psCfg.isMetricsEnabled());
- dsCfg.setWriteThrottlingEnabled(psCfg.isWriteThrottlingEnabled());
- }
-
- cfg.setDataStorageConfiguration(dsCfg);
- }
}
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ValidationOnNodeJoinUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ValidationOnNodeJoinUtils.java
index 6b420ad7f14..4f72dc259d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ValidationOnNodeJoinUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ValidationOnNodeJoinUtils.java
@@ -44,7 +44,6 @@ import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.configuration.DeploymentMode;
import org.apache.ignite.configuration.DiskPageCompression;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
import org.apache.ignite.configuration.TransactionConfiguration;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.IgniteNodeAttributes;
@@ -579,18 +578,6 @@ public class ValidationOnNodeJoinUtils {
if (dsCfgBytes instanceof byte[])
dsCfg = ctx.marshallerContext().jdkMarshaller().unmarshal((byte[])dsCfgBytes, U.resolveClassLoader(ctx.config()));
- if (dsCfg == null) {
- // Try to use legacy memory configuration.
- MemoryConfiguration memCfg = rmt.attribute(IgniteNodeAttributes.ATTR_MEMORY_CONFIG);
-
- if (memCfg != null) {
- dsCfg = new DataStorageConfiguration();
-
- // All properties that are used in validation should be converted here.
- dsCfg.setPageSize(memCfg.getPageSize());
- }
- }
-
if (dsCfg != null) {
DataStorageConfiguration locDsCfg = ctx.config().getDataStorageConfiguration();
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 3b2d876769b..13d496db4b7 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -210,7 +210,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
@SystemProperty(value = "Enables log checkpoint read lock holders")
public static final String IGNITE_PDS_LOG_CP_READ_LOCK_HOLDERS = "IGNITE_PDS_LOG_CP_READ_LOCK_HOLDERS";
- /** MemoryPolicyConfiguration name reserved for meta store. */
+ /** {@link DataRegionConfiguration} name reserved for meta store. */
public static final String METASTORE_DATA_REGION_NAME = "metastoreMemPlc";
/** Name of the system view for a system {@link MetaStorage}. */
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index 6f97090a929..4e6afa965b7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -66,10 +66,7 @@ import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.configuration.DiskPageCompression;
import org.apache.ignite.configuration.ExecutorConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
-import org.apache.ignite.configuration.MemoryPolicyConfiguration;
import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.configuration.PersistentStoreConfiguration;
import org.apache.ignite.configuration.PlatformCacheConfiguration;
import org.apache.ignite.configuration.SqlConnectorConfiguration;
import org.apache.ignite.configuration.SystemDataRegionConfiguration;
@@ -897,9 +894,6 @@ public class PlatformConfigurationUtils {
break;
}
- if (in.readBoolean())
- cfg.setMemoryConfiguration(readMemoryConfiguration(in));
-
if (in.readBoolean())
cfg.setSqlConnectorConfiguration(readSqlConnectorConfiguration(in));
@@ -909,9 +903,6 @@ public class PlatformConfigurationUtils {
if (!in.readBoolean()) // ClientConnectorConfigurationEnabled override
cfg.setClientConnectorConfiguration(null);
- if (in.readBoolean())
- cfg.setPersistentStoreConfiguration(readPersistentStoreConfiguration(in));
-
if (in.readBoolean())
cfg.setDataStorageConfiguration(readDataStorageConfiguration(in));
@@ -1509,16 +1500,12 @@ public class PlatformConfigurationUtils {
w.writeLong(((MemoryEventStorageSpi)evtStorageSpi).getExpireAgeMs());
}
- writeMemoryConfiguration(w, cfg.getMemoryConfiguration());
-
writeSqlConnectorConfiguration(w, cfg.getSqlConnectorConfiguration());
writeClientConnectorConfiguration(w, cfg.getClientConnectorConfiguration());
w.writeBoolean(cfg.getClientConnectorConfiguration() != null);
- writePersistentStoreConfiguration(w, cfg.getPersistentStoreConfiguration());
-
writeDataStorageConfiguration(w, cfg.getDataStorageConfiguration());
writeSslContextFactory(w, cfg.getSslContextFactory());
@@ -1785,93 +1772,6 @@ public class PlatformConfigurationUtils {
return factory.create();
}
- /**
- * Reads the memory configuration.
- *
- * @param in Reader
- * @return Config.
- */
- @SuppressWarnings("deprecation")
- private static MemoryConfiguration readMemoryConfiguration(BinaryRawReader in) {
- MemoryConfiguration res = new MemoryConfiguration();
-
- res.setSystemCacheInitialSize(in.readLong())
- .setSystemCacheMaxSize(in.readLong())
- .setPageSize(in.readInt())
- .setConcurrencyLevel(in.readInt())
- .setDefaultMemoryPolicyName(in.readString());
-
- int cnt = in.readInt();
-
- if (cnt > 0) {
- MemoryPolicyConfiguration[] plcs = new MemoryPolicyConfiguration[cnt];
-
- for (int i = 0; i < cnt; i++) {
- MemoryPolicyConfiguration cfg = new MemoryPolicyConfiguration();
-
- cfg.setName(in.readString())
- .setInitialSize(in.readLong())
- .setMaxSize(in.readLong())
- .setSwapFilePath(in.readString())
- .setPageEvictionMode(DataPageEvictionMode.values()[in.readInt()])
- .setEvictionThreshold(in.readDouble())
- .setEmptyPagesPoolSize(in.readInt())
- .setMetricsEnabled(in.readBoolean())
- .setSubIntervals(in.readInt())
- .setRateTimeInterval(in.readLong());
-
- plcs[i] = cfg;
- }
-
- res.setMemoryPolicies(plcs);
- }
-
- return res;
- }
-
- /**
- * Writes the memory configuration.
- *
- * @param w Writer.
- * @param cfg Config.
- */
- @SuppressWarnings("deprecation")
- private static void writeMemoryConfiguration(BinaryRawWriter w, MemoryConfiguration cfg) {
- if (cfg == null) {
- w.writeBoolean(false);
- return;
- }
-
- w.writeBoolean(true);
-
- w.writeLong(cfg.getSystemCacheInitialSize());
- w.writeLong(cfg.getSystemCacheMaxSize());
- w.writeInt(cfg.getPageSize());
- w.writeInt(cfg.getConcurrencyLevel());
- w.writeString(cfg.getDefaultMemoryPolicyName());
-
- MemoryPolicyConfiguration[] plcs = cfg.getMemoryPolicies();
-
- if (plcs != null) {
- w.writeInt(plcs.length);
-
- for (MemoryPolicyConfiguration plc : plcs) {
- w.writeString(plc.getName());
- w.writeLong(plc.getInitialSize());
- w.writeLong(plc.getMaxSize());
- w.writeString(plc.getSwapFilePath());
- w.writeInt(plc.getPageEvictionMode().ordinal());
- w.writeDouble(plc.getEvictionThreshold());
- w.writeInt(plc.getEmptyPagesPoolSize());
- w.writeBoolean(plc.isMetricsEnabled());
- w.writeInt(plc.getSubIntervals());
- w.writeLong(plc.getRateTimeInterval());
- }
- }
- else
- w.writeInt(0);
- }
-
/**
* Reads the SQL connector configuration.
*
@@ -1992,38 +1892,6 @@ public class PlatformConfigurationUtils {
w.writeBoolean(false);
}
- /**
- * Reads the persistence store connector configuration.
- *
- * @param in Reader.
- * @return Config.
- */
- @SuppressWarnings("deprecation")
- private static PersistentStoreConfiguration readPersistentStoreConfiguration(BinaryRawReader in) {
- return new PersistentStoreConfiguration()
- .setPersistentStorePath(in.readString())
- .setCheckpointingFrequency(in.readLong())
- .setCheckpointingPageBufferSize(in.readLong())
- .setCheckpointingThreads(in.readInt())
- .setLockWaitTime((int)in.readLong())
- .setWalHistorySize(in.readInt())
- .setWalSegments(in.readInt())
- .setWalSegmentSize(in.readInt())
- .setWalStorePath(in.readString())
- .setWalArchivePath(in.readString())
- .setWalMode(WALMode.fromOrdinal(in.readInt()))
- .setWalBufferSize(in.readInt())
- .setWalFlushFrequency((int)in.readLong())
- .setWalFsyncDelayNanos(in.readLong())
- .setWalRecordIteratorBufferSize(in.readInt())
- .setAlwaysWriteFullPages(in.readBoolean())
- .setMetricsEnabled(in.readBoolean())
- .setSubIntervals(in.readInt())
- .setRateTimeInterval(in.readLong())
- .setCheckpointWriteOrder(CheckpointWriteOrder.fromOrdinal(in.readInt()))
- .setWriteThrottlingEnabled(in.readBoolean());
- }
-
/**
* Reads the data storage configuration.
*
@@ -2121,44 +1989,6 @@ public class PlatformConfigurationUtils {
return f;
}
- /**
- * Writes the persistent store configuration.
- *
- * @param w Writer.
- */
- @SuppressWarnings("deprecation")
- private static void writePersistentStoreConfiguration(BinaryRawWriter w, PersistentStoreConfiguration cfg) {
- assert w != null;
-
- if (cfg != null) {
- w.writeBoolean(true);
-
- w.writeString(cfg.getPersistentStorePath());
- w.writeLong(cfg.getCheckpointingFrequency());
- w.writeLong(cfg.getCheckpointingPageBufferSize());
- w.writeInt(cfg.getCheckpointingThreads());
- w.writeLong(cfg.getLockWaitTime());
- w.writeInt(cfg.getWalHistorySize());
- w.writeInt(cfg.getWalSegments());
- w.writeInt(cfg.getWalSegmentSize());
- w.writeString(cfg.getWalStorePath());
- w.writeString(cfg.getWalArchivePath());
- w.writeInt(cfg.getWalMode().ordinal());
- w.writeInt(cfg.getWalBufferSize());
- w.writeLong(cfg.getWalFlushFrequency());
- w.writeLong(cfg.getWalFsyncDelayNanos());
- w.writeInt(cfg.getWalRecordIteratorBufferSize());
- w.writeBoolean(cfg.isAlwaysWriteFullPages());
- w.writeBoolean(cfg.isMetricsEnabled());
- w.writeInt(cfg.getSubIntervals());
- w.writeLong(cfg.getRateTimeInterval());
- w.writeInt(cfg.getCheckpointWriteOrder().ordinal());
- w.writeBoolean(cfg.isWriteThrottlingEnabled());
- }
- else
- w.writeBoolean(false);
- }
-
/**
* Writes the data storage configuration.
*
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java
index 8dc02770f9d..fb5496ef596 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java
@@ -30,8 +30,9 @@ import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.cluster.ClusterState;
import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.PersistentStoreConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
import org.apache.ignite.internal.processors.marshaller.MappingProposedMessage;
@@ -93,8 +94,11 @@ public class IgniteMarshallerCacheFSRestoreTest extends GridCommonAbstractTest {
cfg.setCacheConfiguration(singleCacheCfg);
//persistence must be enabled to verify restoring mappings from FS case
- if (isPersistenceEnabled)
- cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration());
+ if (isPersistenceEnabled) {
+ cfg.setDataStorageConfiguration(new DataStorageConfiguration()
+ .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
+ .setPersistenceEnabled(true)));
+ }
return cfg;
}
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java
index 08ba9b809bf..abdadc1ade8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java
@@ -30,8 +30,9 @@ import org.apache.ignite.IgniteLogger;
import org.apache.ignite.cache.affinity.Affinity;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
import org.apache.ignite.configuration.TopologyValidator;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCacheTopologySplitAbstractTest;
@@ -158,8 +159,9 @@ public class IgniteTopologyValidatorGridSplitCacheTest extends IgniteCacheTopolo
}
cfg.setUserAttributes(userAttrs);
- cfg.setMemoryConfiguration(new MemoryConfiguration().
- setDefaultMemoryPolicySize((50L << 20) + (100L << 20) * CACHES_CNT / GRID_CNT));
+ cfg.setDataStorageConfiguration(new DataStorageConfiguration()
+ .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
+ .setInitialSize((50L << 20) + (100L << 20) * CACHES_CNT / GRID_CNT)));
return cfg;
}
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java
deleted file mode 100644
index 643e154d5df..00000000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
-import org.apache.ignite.configuration.MemoryPolicyConfiguration;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.junit.Test;
-
-/**
- *
- */
-public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest {
- /** */
- private static final String VALID_DEFAULT_MEM_PLC_NAME = "valid_dlft_mem_plc";
-
- /** */
- private static final String VALID_USER_MEM_PLC_NAME = "valid_user_mem_plc";
-
- /** */
- private static final String MISSING_DEFAULT_MEM_PLC_NAME = "missing_mem_plc";
-
- /** Configuration violation type to check. */
- private ValidationViolationType violationType;
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(gridName);
-
- MemoryConfiguration memCfg = new MemoryConfiguration();
-
- MemoryPolicyConfiguration[] plcs = null;
-
- switch (violationType) {
- case NAMES_CONFLICT:
- plcs = createPlcsWithNamesConflictCfg();
-
- break;
-
- case SYSTEM_MEMORY_POLICY_NAME_MISUSE:
- plcs = createPlcWithReservedNameMisuseCfg();
-
- break;
-
- case TOO_SMALL_MEMORY_SIZE:
- plcs = createTooSmallMemoryCfg();
-
- break;
-
- case NULL_NAME_ON_USER_DEFINED_POLICY:
- plcs = createPlcWithNullName();
-
- break;
-
- case MISSING_USER_DEFINED_DEFAULT:
- plcs = createMissingUserDefinedDefault();
-
- memCfg.setDefaultMemoryPolicyName(MISSING_DEFAULT_MEM_PLC_NAME);
-
- break;
-
- case TOO_SMALL_USER_DEFINED_DFLT_MEM_PLC_SIZE:
- memCfg.setDefaultMemoryPolicySize(1);
-
- break;
-
- case DEFAULT_SIZE_IS_DEFINED_TWICE:
- plcs = createValidUserDefault();
-
- memCfg.setDefaultMemoryPolicyName(VALID_DEFAULT_MEM_PLC_NAME);
- memCfg.setDefaultMemoryPolicySize(10L * 1014 * 1024);
-
- break;
-
- case MAX_SIZE_IS_SMALLER_THAN_INITIAL_SIZE:
- plcs = createMaxSizeSmallerThanInitialSize();
-
- break;
-
- case LTE_ZERO_RATE_TIME_INTERVAL:
- plcs = createRateTimeIntervalIsNegative();
-
- break;
-
- case LTE_ZERO_SUB_INTERVALS:
- plcs = createSubIntervalsIsNegative();
-
- break;
-
- default:
- fail("Violation type was not configured: " + violationType);
- }
-
- memCfg.setMemoryPolicies(plcs);
-
- cfg.setMemoryConfiguration(memCfg);
-
- return cfg;
- }
-
- /**
- *
- */
- private MemoryPolicyConfiguration[] createSubIntervalsIsNegative() {
- MemoryPolicyConfiguration[] res = new MemoryPolicyConfiguration[1];
-
- res[0] = createMemoryPolicy(VALID_DEFAULT_MEM_PLC_NAME, 100L * 1024 * 1024, 100L * 1024 * 1024);
- res[0].setSubIntervals(-10);
-
- return res;
- }
-
- /**
- *
- */
- private MemoryPolicyConfiguration[] createRateTimeIntervalIsNegative() {
- MemoryPolicyConfiguration[] res = new MemoryPolicyConfiguration[1];
-
- res[0] = createMemoryPolicy(VALID_DEFAULT_MEM_PLC_NAME, 100L * 1024 * 1024, 100L * 1024 * 1024);
- res[0].setRateTimeInterval(-10);
-
- return res;
- }
-
- /**
- *
- */
- private MemoryPolicyConfiguration[] createValidUserDefault() {
- MemoryPolicyConfiguration[] res = new MemoryPolicyConfiguration[1];
-
- res[0] = createMemoryPolicy(VALID_DEFAULT_MEM_PLC_NAME, 100L * 1024 * 1024, 100L * 1024 * 1024);
-
- return res;
- }
-
- /**
- *
- */
- private MemoryPolicyConfiguration[] createMissingUserDefinedDefault() {
- MemoryPolicyConfiguration[] res = new MemoryPolicyConfiguration[1];
-
- res[0] = createMemoryPolicy(VALID_USER_MEM_PLC_NAME, 10L * 1024 * 1024, 10L * 1024 * 1024);
-
- return res;
- }
-
- /**
- *
- */
- private MemoryPolicyConfiguration[] createPlcWithNullName() {
- MemoryPolicyConfiguration[] res = new MemoryPolicyConfiguration[1];
-
- res[0] = createMemoryPolicy(null, 10L * 1024 * 1024, 10L * 1024 * 1024);
-
- return res;
- }
-
- /**
- *
- */
- private MemoryPolicyConfiguration[] createTooSmallMemoryCfg() {
- MemoryPolicyConfiguration[] res = new MemoryPolicyConfiguration[1];
-
- res[0] = createMemoryPolicy(VALID_DEFAULT_MEM_PLC_NAME, 10, 10);
-
- return res;
- }
-
- /**
- *
- */
- private MemoryPolicyConfiguration[] createPlcWithReservedNameMisuseCfg() {
- MemoryPolicyConfiguration[] res = new MemoryPolicyConfiguration[1];
-
- res[0] = createMemoryPolicy("sysMemPlc", 10L * 1024 * 1024, 10L * 1024 * 1024);
-
- return res;
- }
-
- /**
- *
- */
- private MemoryPolicyConfiguration[] createPlcsWithNamesConflictCfg() {
- MemoryPolicyConfiguration[] res = new MemoryPolicyConfiguration[2];
-
- res[0] = createMemoryPolicy("cflt0", 10L * 1024 * 1024, 10L * 1024 * 1024);
- res[1] = createMemoryPolicy("cflt0", 10L * 1024 * 1024, 10L * 1024 * 1024);
-
- return res;
- }
-
- /**
- *
- */
- private MemoryPolicyConfiguration[] createMaxSizeSmallerThanInitialSize() {
- MemoryPolicyConfiguration[] res = new MemoryPolicyConfiguration[1];
-
- res[0] = createMemoryPolicy("invalidSize", 100L * 1024 * 1024, 10L * 1024 * 1024);
-
- return res;
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- super.afterTest();
-
- stopAllGrids();
- }
-
- /**
- * @param name Name of MemoryPolicyConfiguration.
- * @param initialSize Initial size of MemoryPolicyConfiguration in bytes.
- * @param maxSize Max size of MemoryPolicyConfiguration in bytes.
- */
- private MemoryPolicyConfiguration createMemoryPolicy(String name, long initialSize, long maxSize) {
- MemoryPolicyConfiguration plc = new MemoryPolicyConfiguration();
-
- plc.setName(name);
- plc.setInitialSize(initialSize);
- plc.setMaxSize(maxSize);
-
- return plc;
- }
-
- /**
- * 'sysMemPlc' name is reserved for MemoryPolicyConfiguration for system caches.
- */
- @Test
- public void testReservedMemoryPolicyMisuse() throws Exception {
- violationType = ValidationViolationType.SYSTEM_MEMORY_POLICY_NAME_MISUSE;
-
- doTest(violationType);
- }
-
- /**
- * If user defines default is must be presented among configured memory policies.
- */
- @Test
- public void testMissingUserDefinedDefault() throws Exception {
- violationType = ValidationViolationType.MISSING_USER_DEFINED_DEFAULT;
-
- doTest(violationType);
- }
-
- /**
- * Names of all MemoryPolicies must be distinct.
- */
- @Test
- public void testNamesConflict() throws Exception {
- violationType = ValidationViolationType.NAMES_CONFLICT;
-
- doTest(violationType);
- }
-
- /**
- * User-defined policy must have a non-null non-empty name.
- */
- @Test
- public void testNullNameOnUserDefinedPolicy() throws Exception {
- violationType = ValidationViolationType.NULL_NAME_ON_USER_DEFINED_POLICY;
-
- doTest(violationType);
- }
-
- /**
- * MemoryPolicy must be configured with size of at least 1MB.
- */
- @Test
- public void testMemoryTooSmall() throws Exception {
- violationType = ValidationViolationType.TOO_SMALL_MEMORY_SIZE;
-
- doTest(violationType);
- }
-
- /**
- * MemoryPolicy must be configured with size of at least 1MB.
- */
- @Test
- public void testMaxSizeSmallerThanInitialSize() throws Exception {
- violationType = ValidationViolationType.MAX_SIZE_IS_SMALLER_THAN_INITIAL_SIZE;
-
- doTest(violationType);
- }
-
- /**
- * User-defined size of default MemoryPolicy must be at least 1MB.
- */
- @Test
- public void testUserDefinedDefaultMemoryTooSmall() throws Exception {
- violationType = ValidationViolationType.TOO_SMALL_USER_DEFINED_DFLT_MEM_PLC_SIZE;
-
- doTest(violationType);
- }
-
- /**
- * Defining size of default MemoryPolicy twice with and through <b>defaultMemoryPolicySize</b> property
- * and using <b>MemoryPolicyConfiguration</b> description is prohibited.
- */
- @Test
- public void testDefaultMemoryPolicySizeDefinedTwice() throws Exception {
- violationType = ValidationViolationType.DEFAULT_SIZE_IS_DEFINED_TWICE;
-
- doTest(violationType);
- }
-
- /**
- *
- */
- @Test
- public void testRateTimeIntervalPropertyIsNegative() throws Exception {
- violationType = ValidationViolationType.LTE_ZERO_RATE_TIME_INTERVAL;
-
- doTest(violationType);
- }
-
- /**
- *
- */
- @Test
- public void testSubIntervalsPropertyIsNegative() throws Exception {
- violationType = ValidationViolationType.LTE_ZERO_SUB_INTERVALS;
-
- doTest(violationType);
- }
-
- /**
- * Tries to start ignite node with invalid configuration and checks that corresponding exception is thrown.
- *
- * @param violationType Configuration violation type.
- */
- private void doTest(ValidationViolationType violationType) throws Exception {
- try {
- startGrid(0);
- }
- catch (IgniteCheckedException e) {
- Throwable c = e.getCause();
-
- assertTrue(c != null);
- assertTrue(c.getMessage().contains(violationType.violationMsg));
-
- return;
- }
-
- fail("Expected exception hasn't been thrown");
- }
-
- /**
- *
- */
- private enum ValidationViolationType {
- /** */
- NAMES_CONFLICT("have the same name"),
-
- /** */
- SYSTEM_MEMORY_POLICY_NAME_MISUSE("name is reserved for internal use"),
-
- /** */
- TOO_SMALL_MEMORY_SIZE("must have size more than 10MB"),
-
- /** */
- NULL_NAME_ON_USER_DEFINED_POLICY("must have non-null and non-empty name"),
-
- /** */
- MISSING_USER_DEFINED_DEFAULT("name must be presented among configured"),
-
- /** */
- DEFAULT_SIZE_IS_DEFINED_TWICE("properties are set at the same time."),
-
- /** */
- TOO_SMALL_USER_DEFINED_DFLT_MEM_PLC_SIZE("must have size more than 10MB"),
-
- /** */
- MAX_SIZE_IS_SMALLER_THAN_INITIAL_SIZE("must not be smaller than initialSize"),
-
- /** Case when rateTimeInterval property of MemoryPolicyConfiguration is less than or equals zero. */
- LTE_ZERO_RATE_TIME_INTERVAL("Rate time interval must be greater than zero"),
-
- /** Case when subIntervals property of MemoryPolicyConfiguration is less than or equals zero. */
- LTE_ZERO_SUB_INTERVALS("Sub intervals must be greater than zero");
-
- /**
- * @param violationMsg Violation message.
- */
- ValidationViolationType(String violationMsg) {
- this.violationMsg = violationMsg;
- }
-
- /** */
- String violationMsg;
- }
-}
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java
deleted file mode 100644
index 70f88cbae11..00000000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.processors.cache.persistence;
-
-import java.util.Collection;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
-import org.apache.ignite.configuration.MemoryPolicyConfiguration;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.junit.Test;
-
-import static org.apache.ignite.configuration.MemoryConfiguration.DFLT_MEM_PLC_DEFAULT_NAME;
-import static org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.VOLATILE_DATA_REGION_NAME;
-
-/**
- *
- */
-public class MemoryPolicyInitializationTest extends GridCommonAbstractTest {
- /** */
- private static final String CUSTOM_NON_DEFAULT_MEM_PLC_NAME = "custom_mem_plc";
-
- /** */
- private static final long USER_CUSTOM_MEM_PLC_SIZE = 89L * 1024 * 1024;
-
- /** */
- private static final long USER_DEFAULT_MEM_PLC_SIZE = 99L * 1024 * 1024;
-
- /** */
- private MemoryConfiguration memCfg;
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
- cfg.setMemoryConfiguration(memCfg);
-
- return cfg;
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- memCfg = null;
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- stopAllGrids();
- }
-
- /**
- * Verifies that expected memory policies are allocated when used doesn't provide any MemoryPolicyConfiguration.
- */
- @Test
- public void testNoConfigProvided() throws Exception {
- memCfg = null;
-
- IgniteEx ignite = startGrid(0);
-
- Collection<DataRegion> allMemPlcs = ignite.context().cache().context().database().dataRegions();
-
- assertEquals(3, allMemPlcs.size());
-
- verifyDefaultAndSystemMemoryPolicies(allMemPlcs);
- }
-
- /**
- * Verifies that expected memory policies are allocated when used provides MemoryPolicyConfiguration
- * with non-default custom MemoryPolicy.
- */
- @Test
- public void testCustomConfigNoDefault() throws Exception {
- prepareCustomNoDefaultConfig();
-
- IgniteEx ignite = startGrid(0);
-
- Collection<DataRegion> allMemPlcs = ignite.context().cache().context().database().dataRegions();
-
- assertEquals(4, allMemPlcs.size());
-
- verifyDefaultAndSystemMemoryPolicies(allMemPlcs);
-
- assertTrue("Custom non-default memory policy is not presented",
- isMemoryPolicyPresented(allMemPlcs, CUSTOM_NON_DEFAULT_MEM_PLC_NAME));
- }
-
- /**
- * User is allowed to configure memory policy with 'default' name,
- * in that case Ignite instance will use this user-defined memory policy as a default one.
- */
- @Test
- public void testCustomConfigOverridesDefault() throws Exception {
- prepareCustomConfigWithOverridingDefault();
-
- IgniteEx ignite = startGrid(0);
-
- IgniteCacheDatabaseSharedManager dbMgr = ignite.context().cache().context().database();
-
- Collection<DataRegion> allMemPlcs = dbMgr.dataRegions();
-
- assertEquals(3, allMemPlcs.size());
-
- verifyDefaultAndSystemMemoryPolicies(allMemPlcs);
-
- DataRegion dfltMemPlc = U.field(dbMgr, "dfltDataRegion");
-
- assertEquals(dfltMemPlc.config().getMaxSize(), USER_DEFAULT_MEM_PLC_SIZE);
- }
-
- /**
- * User is allowed to define fully custom memory policy and make it default by setting its name to memory config.
- *
- * At the same time user still can create a memory policy with name 'default'
- * which although won't be used as default.
- */
- @Test
- public void testCustomConfigOverridesDefaultNameAndDeclaresDefault() throws Exception {
- prepareCustomConfigWithOverriddenDefaultName();
-
- IgniteEx ignite = startGrid(0);
-
- IgniteCacheDatabaseSharedManager dbMgr = ignite.context().cache().context().database();
-
- Collection<DataRegion> allMemPlcs = dbMgr.dataRegions();
-
- assertEquals(4, allMemPlcs.size());
-
- verifyDefaultAndSystemMemoryPolicies(allMemPlcs);
-
- DataRegion dfltMemPlc = U.field(dbMgr, "dfltDataRegion");
-
- assertEquals(dfltMemPlc.config().getMaxSize(), USER_CUSTOM_MEM_PLC_SIZE);
- }
-
- /**
- * Test for verification that caches with not specified memory policy name,
- * with specified default memory policy name and specified custom memory policy name
- * all started with correct memory policy.
- */
- @Test
- public void testCachesOnOverriddenMemoryPolicy() throws Exception {
- prepareCustomConfigWithOverridingDefaultAndCustom();
-
- IgniteEx ignite = startGrid(0);
-
- CacheConfiguration cache1Cfg = new CacheConfiguration()
- .setName("cache1");
-
- IgniteCache cache1 = ignite.createCache(cache1Cfg);
-
- verifyCacheMemoryPolicy(cache1, DFLT_MEM_PLC_DEFAULT_NAME);
-
- CacheConfiguration cache2Cfg = new CacheConfiguration()
- .setName("cache2")
- .setMemoryPolicyName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME);
-
- IgniteCache cache2 = ignite.createCache(cache2Cfg);
-
- verifyCacheMemoryPolicy(cache2, CUSTOM_NON_DEFAULT_MEM_PLC_NAME);
-
- CacheConfiguration cache3Cfg = new CacheConfiguration()
- .setName("cache3")
- .setMemoryPolicyName(DFLT_MEM_PLC_DEFAULT_NAME);
-
- IgniteCache cache3 = ignite.createCache(cache3Cfg);
-
- verifyCacheMemoryPolicy(cache3, DFLT_MEM_PLC_DEFAULT_NAME);
- }
-
- /**
- * Test for verification that caches with not specified memory policy name,
- * with specified default memory policy name and specified custom memory policy name
- * all started with correct memory policy.
- */
- @Test
- public void testCachesOnUserDefinedDefaultMemoryPolicy() throws Exception {
- prepareCustomConfigWithOverriddenDefaultName();
-
- IgniteEx ignite = startGrid(0);
-
- CacheConfiguration cache1Cfg = new CacheConfiguration()
- .setName("cache1");
-
- IgniteCache cache1 = ignite.createCache(cache1Cfg);
-
- verifyCacheMemoryPolicy(cache1, CUSTOM_NON_DEFAULT_MEM_PLC_NAME);
-
- CacheConfiguration cache2Cfg = new CacheConfiguration()
- .setName("cache2")
- .setMemoryPolicyName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME);
-
- IgniteCache cache2 = ignite.createCache(cache2Cfg);
-
- verifyCacheMemoryPolicy(cache2, CUSTOM_NON_DEFAULT_MEM_PLC_NAME);
-
- CacheConfiguration cache3Cfg = new CacheConfiguration()
- .setName("cache3")
- .setMemoryPolicyName(DFLT_MEM_PLC_DEFAULT_NAME);
-
- IgniteCache cache3 = ignite.createCache(cache3Cfg);
-
- verifyCacheMemoryPolicy(cache3, DFLT_MEM_PLC_DEFAULT_NAME);
- }
-
- /**
- * @param cache Cache.
- * @param plcName Policy name.
- */
- private void verifyCacheMemoryPolicy(IgniteCache cache, String plcName) {
- GridCacheContext ctx = ((IgniteCacheProxy)cache).context();
-
- assertEquals(plcName, ctx.dataRegion().config().getName());
- }
-
- /**
- *
- */
- private void prepareCustomConfigWithOverriddenDefaultName() {
- memCfg = new MemoryConfiguration();
-
- memCfg.setDefaultMemoryPolicyName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME);
-
- memCfg.setMemoryPolicies(new MemoryPolicyConfiguration()
- .setName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME)
- .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
- .setMaxSize(USER_CUSTOM_MEM_PLC_SIZE),
-
- new MemoryPolicyConfiguration()
- .setName(DFLT_MEM_PLC_DEFAULT_NAME)
- .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
- .setMaxSize(USER_DEFAULT_MEM_PLC_SIZE)
- );
- }
-
- /**
- *
- */
- private void prepareCustomConfigWithOverridingDefault() {
- memCfg = new MemoryConfiguration();
-
- memCfg.setMemoryPolicies(new MemoryPolicyConfiguration()
- .setName(DFLT_MEM_PLC_DEFAULT_NAME)
- .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
- .setMaxSize(USER_DEFAULT_MEM_PLC_SIZE)
- );
- }
-
- /**
- *
- */
- private void prepareCustomConfigWithOverridingDefaultAndCustom() {
- memCfg = new MemoryConfiguration();
-
- memCfg.setMemoryPolicies(new MemoryPolicyConfiguration()
- .setName(DFLT_MEM_PLC_DEFAULT_NAME)
- .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
- .setMaxSize(USER_DEFAULT_MEM_PLC_SIZE),
-
- new MemoryPolicyConfiguration()
- .setName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME)
- .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
- .setMaxSize(USER_CUSTOM_MEM_PLC_SIZE)
- );
- }
-
- /**
- * @param allMemPlcs Collection of all memory policies.
- */
- private void verifyDefaultAndSystemMemoryPolicies(Collection<DataRegion> allMemPlcs) {
- assertTrue("Default memory policy is not presented",
- isMemoryPolicyPresented(allMemPlcs, DFLT_MEM_PLC_DEFAULT_NAME));
-
- assertTrue("System memory policy is not presented",
- isMemoryPolicyPresented(allMemPlcs, IgniteCacheDatabaseSharedManager.SYSTEM_DATA_REGION_NAME));
-
- assertTrue("Volatile memory policy is not presented",
- isMemoryPolicyPresented(allMemPlcs, VOLATILE_DATA_REGION_NAME));
- }
-
- /**
- *
- */
- private void prepareCustomNoDefaultConfig() {
- memCfg = new MemoryConfiguration();
-
- memCfg.setMemoryPolicies(new MemoryPolicyConfiguration()
- .setName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME)
- .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
- .setMaxSize(USER_CUSTOM_MEM_PLC_SIZE)
- );
- }
-
- /**
- * @param memPlcs Collection of memory policies.
- * @param nameToVerify Excepted name of memory policy.
- */
- private boolean isMemoryPolicyPresented(Collection<DataRegion> memPlcs, String nameToVerify) {
- for (DataRegion memPlc : memPlcs) {
- if (nameToVerify.equals(memPlc.config().getName()))
- return true;
- }
-
- return false;
- }
-}
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
index 97a6ab93f69..b89ea7a0a4d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
@@ -58,7 +58,6 @@ import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheAndNodeStop
import org.apache.ignite.internal.processors.cache.IgniteNearClientCacheCloseTest;
import org.apache.ignite.internal.processors.cache.IgniteOnePhaseCommitInvokeTest;
import org.apache.ignite.internal.processors.cache.IgniteOnePhaseCommitNearReadersTest;
-import org.apache.ignite.internal.processors.cache.MemoryPolicyConfigValidationTest;
import org.apache.ignite.internal.processors.cache.NoPresentCacheInterceptorOnClientTest;
import org.apache.ignite.internal.processors.cache.NonAffinityCoordinatorDynamicStartStopTest;
import org.apache.ignite.internal.processors.cache.RebalanceIteratorLargeEntriesOOMTest;
@@ -161,7 +160,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.NearCachePut
import org.apache.ignite.internal.processors.cache.distributed.near.NearCacheSyncUpdateTest;
import org.apache.ignite.internal.processors.cache.distributed.near.NoneRebalanceModeSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedJobExecutionTest;
-import org.apache.ignite.internal.processors.cache.persistence.MemoryPolicyInitializationTest;
import org.apache.ignite.internal.processors.continuous.IgniteContinuousQueryMetadataUpdateTest;
import org.apache.ignite.internal.processors.continuous.IgniteNoCustomEventsOnNodeStart;
import org.apache.ignite.testframework.GridTestUtils;
@@ -329,8 +327,6 @@ public class IgniteCacheTestSuite2 {
// Configuration validation
GridTestUtils.addTestIfNeeded(suite, CacheConfigurationLeakTest.class, ignoredTests);
- GridTestUtils.addTestIfNeeded(suite, MemoryPolicyConfigValidationTest.class, ignoredTests);
- GridTestUtils.addTestIfNeeded(suite, MemoryPolicyInitializationTest.class, ignoredTests);
GridTestUtils.addTestIfNeeded(suite, CacheGroupLocalConfigurationSelfTest.class, ignoredTests);
// Affinity and collocation
diff --git a/modules/platforms/cpp/core-test/config/affinity-test-32.xml b/modules/platforms/cpp/core-test/config/affinity-test-32.xml
index bd002946501..637a594fabf 100644
--- a/modules/platforms/cpp/core-test/config/affinity-test-32.xml
+++ b/modules/platforms/cpp/core-test/config/affinity-test-32.xml
@@ -31,20 +31,17 @@
<import resource="affinity-test-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/cache-identity-32.xml b/modules/platforms/cpp/core-test/config/cache-identity-32.xml
index e704a0cac3e..464d03644a4 100644
--- a/modules/platforms/cpp/core-test/config/cache-identity-32.xml
+++ b/modules/platforms/cpp/core-test/config/cache-identity-32.xml
@@ -31,20 +31,17 @@
<import resource="cache-identity-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/cache-native-persistence-test-32.xml b/modules/platforms/cpp/core-test/config/cache-native-persistence-test-32.xml
index 76f893fff69..2966c1a4e8f 100644
--- a/modules/platforms/cpp/core-test/config/cache-native-persistence-test-32.xml
+++ b/modules/platforms/cpp/core-test/config/cache-native-persistence-test-32.xml
@@ -31,20 +31,17 @@
<import resource="cache-native-persistence-test-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/cache-query-32.xml b/modules/platforms/cpp/core-test/config/cache-query-32.xml
index 91669ab3133..d4f86ee8138 100644
--- a/modules/platforms/cpp/core-test/config/cache-query-32.xml
+++ b/modules/platforms/cpp/core-test/config/cache-query-32.xml
@@ -31,20 +31,17 @@
<import resource="cache-query-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/cache-query-continuous-32.xml b/modules/platforms/cpp/core-test/config/cache-query-continuous-32.xml
index 1a3629e3047..3c0837b9d75 100644
--- a/modules/platforms/cpp/core-test/config/cache-query-continuous-32.xml
+++ b/modules/platforms/cpp/core-test/config/cache-query-continuous-32.xml
@@ -27,20 +27,17 @@
<import resource="cache-query-continuous-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/cache-query-schema-32.xml b/modules/platforms/cpp/core-test/config/cache-query-schema-32.xml
index 5c63912149d..927ea0b1542 100644
--- a/modules/platforms/cpp/core-test/config/cache-query-schema-32.xml
+++ b/modules/platforms/cpp/core-test/config/cache-query-schema-32.xml
@@ -31,20 +31,17 @@
<import resource="cache-query-schema-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/cache-store-32.xml b/modules/platforms/cpp/core-test/config/cache-store-32.xml
index b9a7dc57d82..c600ac5188c 100644
--- a/modules/platforms/cpp/core-test/config/cache-store-32.xml
+++ b/modules/platforms/cpp/core-test/config/cache-store-32.xml
@@ -31,20 +31,17 @@
<import resource="cache-store-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/cache-test-32.xml b/modules/platforms/cpp/core-test/config/cache-test-32.xml
index cb540746bb2..5cbd013ac4e 100644
--- a/modules/platforms/cpp/core-test/config/cache-test-32.xml
+++ b/modules/platforms/cpp/core-test/config/cache-test-32.xml
@@ -31,20 +31,17 @@
<import resource="cache-test-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/compute-client-32.xml b/modules/platforms/cpp/core-test/config/compute-client-32.xml
index 4cbc6b66498..980eb5d348a 100644
--- a/modules/platforms/cpp/core-test/config/compute-client-32.xml
+++ b/modules/platforms/cpp/core-test/config/compute-client-32.xml
@@ -31,20 +31,17 @@
<import resource="compute-client-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/compute-server0-32.xml b/modules/platforms/cpp/core-test/config/compute-server0-32.xml
index db160dba526..36bb16c4ea9 100644
--- a/modules/platforms/cpp/core-test/config/compute-server0-32.xml
+++ b/modules/platforms/cpp/core-test/config/compute-server0-32.xml
@@ -31,20 +31,17 @@
<import resource="compute-server0-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/compute-server1-32.xml b/modules/platforms/cpp/core-test/config/compute-server1-32.xml
index f6118686cba..bc7b2f06af2 100644
--- a/modules/platforms/cpp/core-test/config/compute-server1-32.xml
+++ b/modules/platforms/cpp/core-test/config/compute-server1-32.xml
@@ -31,20 +31,17 @@
<import resource="compute-server1-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/interop-32.xml b/modules/platforms/cpp/core-test/config/interop-32.xml
index 5724fa775aa..b9fd5405718 100644
--- a/modules/platforms/cpp/core-test/config/interop-32.xml
+++ b/modules/platforms/cpp/core-test/config/interop-32.xml
@@ -31,20 +31,17 @@
<import resource="interop-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/invalid.xml b/modules/platforms/cpp/core-test/config/invalid.xml
index 7ef741a370d..f34f5e71d88 100644
--- a/modules/platforms/cpp/core-test/config/invalid.xml
+++ b/modules/platforms/cpp/core-test/config/invalid.xml
@@ -55,22 +55,18 @@
<property name="socketTimeout" value="-300" />
</bean>
</property>
-
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{40 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{40 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{100 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{100 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/isolated-32.xml b/modules/platforms/cpp/core-test/config/isolated-32.xml
index 82b59291875..27733c01697 100644
--- a/modules/platforms/cpp/core-test/config/isolated-32.xml
+++ b/modules/platforms/cpp/core-test/config/isolated-32.xml
@@ -29,20 +29,17 @@
<import resource="isolated-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/persistence-store-32.xml b/modules/platforms/cpp/core-test/config/persistence-store-32.xml
index 519a696f786..c990e499a59 100644
--- a/modules/platforms/cpp/core-test/config/persistence-store-32.xml
+++ b/modules/platforms/cpp/core-test/config/persistence-store-32.xml
@@ -29,20 +29,17 @@
<import resource="persistence-store-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/core-test/config/persistence-store-default.xml b/modules/platforms/cpp/core-test/config/persistence-store-default.xml
index 373ef287fd2..05db140b109 100644
--- a/modules/platforms/cpp/core-test/config/persistence-store-default.xml
+++ b/modules/platforms/cpp/core-test/config/persistence-store-default.xml
@@ -29,8 +29,14 @@
<bean abstract="true" id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="localHost" value="127.0.0.1"/>
- <property name="persistentStoreConfiguration">
- <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="persistenceEnabled" value="true"/>
+ </bean>
+ </property>
+ </bean>
</property>
</bean>
</beans>
diff --git a/modules/platforms/cpp/odbc-test/config/queries-auth-32.xml b/modules/platforms/cpp/odbc-test/config/queries-auth-32.xml
index c2ab51ef436..0b17930fe6c 100644
--- a/modules/platforms/cpp/odbc-test/config/queries-auth-32.xml
+++ b/modules/platforms/cpp/odbc-test/config/queries-auth-32.xml
@@ -37,24 +37,18 @@
</bean>
</property>
- <property name="persistentStoreConfiguration">
- <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"/>
- </property>
-
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
-
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
+
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="persistenceEnabled" value="true"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/odbc-test/config/queries-auth.xml b/modules/platforms/cpp/odbc-test/config/queries-auth.xml
index 5d462bc6c70..655ba6bb703 100644
--- a/modules/platforms/cpp/odbc-test/config/queries-auth.xml
+++ b/modules/platforms/cpp/odbc-test/config/queries-auth.xml
@@ -37,8 +37,14 @@
</bean>
</property>
- <property name="persistentStoreConfiguration">
- <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="persistenceEnabled" value="true"/>
+ </bean>
+ </property>
+ </bean>
</property>
</bean>
</beans>
diff --git a/modules/platforms/cpp/odbc-test/config/queries-schema-32.xml b/modules/platforms/cpp/odbc-test/config/queries-schema-32.xml
index c564301258c..c0432be739a 100644
--- a/modules/platforms/cpp/odbc-test/config/queries-schema-32.xml
+++ b/modules/platforms/cpp/odbc-test/config/queries-schema-32.xml
@@ -31,20 +31,17 @@
<import resource="queries-schema-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/odbc-test/config/queries-ssl-32.xml b/modules/platforms/cpp/odbc-test/config/queries-ssl-32.xml
index 67d72bb10da..81ddc6fcea7 100644
--- a/modules/platforms/cpp/odbc-test/config/queries-ssl-32.xml
+++ b/modules/platforms/cpp/odbc-test/config/queries-ssl-32.xml
@@ -56,20 +56,17 @@
</bean>
</property>
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/odbc-test/config/queries-test-32.xml b/modules/platforms/cpp/odbc-test/config/queries-test-32.xml
index f4b33177bab..d5170d4003e 100644
--- a/modules/platforms/cpp/odbc-test/config/queries-test-32.xml
+++ b/modules/platforms/cpp/odbc-test/config/queries-test-32.xml
@@ -27,20 +27,17 @@
<import resource="queries-default.xml"/>
<bean parent="queries.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/thin-client-test/config/auth-32.xml b/modules/platforms/cpp/thin-client-test/config/auth-32.xml
index c4ba75cde77..ac901213ea1 100644
--- a/modules/platforms/cpp/thin-client-test/config/auth-32.xml
+++ b/modules/platforms/cpp/thin-client-test/config/auth-32.xml
@@ -27,20 +27,17 @@
<import resource="auth-default.xml"/>
<bean parent="test.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/thin-client-test/config/auth-default.xml b/modules/platforms/cpp/thin-client-test/config/auth-default.xml
index 3d197e7ff88..b734c8b64b9 100644
--- a/modules/platforms/cpp/thin-client-test/config/auth-default.xml
+++ b/modules/platforms/cpp/thin-client-test/config/auth-default.xml
@@ -40,8 +40,14 @@
<property name="authenticationEnabled" value="true"/>
- <property name="persistentStoreConfiguration">
- <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="persistenceEnabled" value="true"/>
+ </bean>
+ </property>
+ </bean>
</property>
<property name="clientConnectorConfiguration">
diff --git a/modules/platforms/cpp/thin-client-test/config/cache-32.xml b/modules/platforms/cpp/thin-client-test/config/cache-32.xml
index ecccd0da3eb..e97464aac36 100644
--- a/modules/platforms/cpp/thin-client-test/config/cache-32.xml
+++ b/modules/platforms/cpp/thin-client-test/config/cache-32.xml
@@ -31,20 +31,17 @@
<import resource="cache-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/thin-client-test/config/cache-query-continuous-32.xml b/modules/platforms/cpp/thin-client-test/config/cache-query-continuous-32.xml
index 1a3629e3047..3c0837b9d75 100644
--- a/modules/platforms/cpp/thin-client-test/config/cache-query-continuous-32.xml
+++ b/modules/platforms/cpp/thin-client-test/config/cache-query-continuous-32.xml
@@ -27,20 +27,17 @@
<import resource="cache-query-continuous-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/thin-client-test/config/compute-32.xml b/modules/platforms/cpp/thin-client-test/config/compute-32.xml
index d8b5bfb9d4e..2606fa83b16 100644
--- a/modules/platforms/cpp/thin-client-test/config/compute-32.xml
+++ b/modules/platforms/cpp/thin-client-test/config/compute-32.xml
@@ -31,20 +31,17 @@
<import resource="compute-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/thin-client-test/config/interop-32.xml b/modules/platforms/cpp/thin-client-test/config/interop-32.xml
index 5724fa775aa..b9fd5405718 100644
--- a/modules/platforms/cpp/thin-client-test/config/interop-32.xml
+++ b/modules/platforms/cpp/thin-client-test/config/interop-32.xml
@@ -31,20 +31,17 @@
<import resource="interop-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/thin-client-test/config/non-ssl-32.xml b/modules/platforms/cpp/thin-client-test/config/non-ssl-32.xml
index 8eb03bb8a97..bffc57cf94f 100644
--- a/modules/platforms/cpp/thin-client-test/config/non-ssl-32.xml
+++ b/modules/platforms/cpp/thin-client-test/config/non-ssl-32.xml
@@ -27,20 +27,17 @@
<import resource="non-ssl-default.xml"/>
<bean parent="test.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/thin-client-test/config/sql-query-fields-32.xml b/modules/platforms/cpp/thin-client-test/config/sql-query-fields-32.xml
index 33f1fa054c2..b453a52fa7b 100644
--- a/modules/platforms/cpp/thin-client-test/config/sql-query-fields-32.xml
+++ b/modules/platforms/cpp/thin-client-test/config/sql-query-fields-32.xml
@@ -31,20 +31,17 @@
<import resource="sql-query-fields-default.xml"/>
<bean parent="grid.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/thin-client-test/config/ssl-32.xml b/modules/platforms/cpp/thin-client-test/config/ssl-32.xml
index 0750580e4b3..300dd714455 100644
--- a/modules/platforms/cpp/thin-client-test/config/ssl-32.xml
+++ b/modules/platforms/cpp/thin-client-test/config/ssl-32.xml
@@ -27,20 +27,17 @@
<import resource="ssl-default.xml"/>
<bean parent="test.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/cpp/thin-client-test/config/ssl-no-client-auth-32.xml b/modules/platforms/cpp/thin-client-test/config/ssl-no-client-auth-32.xml
index 7ea7e9f45a8..039040a9527 100644
--- a/modules/platforms/cpp/thin-client-test/config/ssl-no-client-auth-32.xml
+++ b/modules/platforms/cpp/thin-client-test/config/ssl-no-client-auth-32.xml
@@ -27,20 +27,17 @@
<import resource="ssl-no-client-auth-default.xml"/>
<bean parent="no-client-auth.cfg">
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/>
- <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="systemRegionInitialSize" value="#{10 * 1024 * 1024}"/>
+ <property name="systemRegionMaxSize" value="#{40 * 1024 * 1024}"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="dfltPlc"/>
- <property name="maxSize" value="#{100 * 1024 * 1024}"/>
- <property name="initialSize" value="#{10 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="dfltPlc"/>
+ <property name="maxSize" value="#{100 * 1024 * 1024}"/>
+ <property name="initialSize" value="#{10 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
index ed1b7e20ce2..3ec9bd709d4 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
@@ -72,26 +72,6 @@ namespace Apache.Ignite.Core.Tests.Cache
},
IgniteInstanceName = CacheName,
BinaryConfiguration = new BinaryConfiguration(typeof(Entity)),
-#pragma warning disable 618
- MemoryConfiguration = new MemoryConfiguration
- {
- MemoryPolicies = new[]
- {
- new MemoryPolicyConfiguration
- {
- Name = "myMemPolicy",
- InitialSize = 77 * 1024 * 1024,
- MaxSize = 99 * 1024 * 1024
- },
- new MemoryPolicyConfiguration
- {
- Name = MemoryConfiguration.DefaultDefaultMemoryPolicyName,
- InitialSize = 55 * 1024 * 1024,
- MaxSize = 88 * 1024 * 1024
- }
- }
- },
-#pragma warning restore 618
DataStorageConfiguration = null,
SpringConfigUrl = Path.Combine("Config", "cache-default.xml")
};
@@ -322,9 +302,6 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(x.WriteBehindFlushFrequency, y.WriteBehindFlushFrequency);
Assert.AreEqual(x.WriteBehindFlushSize, y.WriteBehindFlushSize);
Assert.AreEqual(x.EnableStatistics, y.EnableStatistics);
-#pragma warning disable 618
- Assert.AreEqual(x.MemoryPolicyName, y.MemoryPolicyName);
-#pragma warning restore 618
Assert.AreEqual(x.PartitionLossPolicy, y.PartitionLossPolicy);
Assert.AreEqual(x.WriteBehindCoalescing, y.WriteBehindCoalescing);
Assert.AreEqual(x.GroupName, y.GroupName);
@@ -688,9 +665,6 @@ namespace Apache.Ignite.Core.Tests.Cache
},
ExpiryPolicyFactory = new ExpiryFactory(),
EnableStatistics = true,
-#pragma warning disable 618
- MemoryPolicyName = "myMemPolicy",
-#pragma warning restore 618
PartitionLossPolicy = PartitionLossPolicy.ReadOnlySafe,
PluginConfigurations = new[] { new MyPluginConfiguration() },
SqlIndexMaxInlineSize = 10000,
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
deleted file mode 100644
index b993aa2e935..00000000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma warning disable 618
-namespace Apache.Ignite.Core.Tests.Cache
-{
- using System.Linq;
- using Apache.Ignite.Core.Cache;
- using Apache.Ignite.Core.Cache.Configuration;
- using NUnit.Framework;
-
- /// <summary>
- /// Memory metrics tests.
- /// </summary>
- public class MemoryMetricsTest
- {
- /** */
- private const string MemoryPolicyWithMetrics = "plcWithMetrics";
-
- /** */
- private const string MemoryPolicyNoMetrics = "plcNoMetrics";
-
- /// <summary>
- /// Tests the memory metrics.
- /// </summary>
- [Test]
- public void TestMemoryMetrics()
- {
- var ignite = StartIgniteWithTwoPolicies();
-
- // Verify metrics.
- var metrics = ignite.GetMemoryMetrics().OrderBy(x => x.Name).ToArray();
- Assert.AreEqual(4, metrics.Length); // two defined plus system and volatile.
-
- var emptyMetrics = metrics[0];
- Assert.AreEqual(MemoryPolicyNoMetrics, emptyMetrics.Name);
- AssertMetricsAreEmpty(emptyMetrics);
-
- var memMetrics = metrics[1];
- Assert.AreEqual(MemoryPolicyWithMetrics, memMetrics.Name);
- Assert.Greater(memMetrics.AllocationRate, 0);
- Assert.AreEqual(0, memMetrics.EvictionRate);
- Assert.AreEqual(0, memMetrics.LargeEntriesPagesPercentage);
- Assert.Greater(memMetrics.PageFillFactor, 0);
- Assert.Greater(memMetrics.TotalAllocatedPages, 1000);
-
- var sysMetrics = metrics[2];
- Assert.AreEqual("sysMemPlc", sysMetrics.Name);
- AssertMetricsAreEmpty(sysMetrics);
-
- var volatileMetrics = metrics[3];
- Assert.AreEqual("volatileDsMemPlc", volatileMetrics.Name);
- AssertMetricsAreEmpty(volatileMetrics);
-
- // Metrics by name.
- emptyMetrics = ignite.GetMemoryMetrics(MemoryPolicyNoMetrics);
- Assert.AreEqual(MemoryPolicyNoMetrics, emptyMetrics.Name);
- AssertMetricsAreEmpty(emptyMetrics);
-
- memMetrics = ignite.GetMemoryMetrics(MemoryPolicyWithMetrics);
- Assert.AreEqual(MemoryPolicyWithMetrics, memMetrics.Name);
- Assert.Greater(memMetrics.AllocationRate, 0);
- Assert.AreEqual(0, memMetrics.EvictionRate);
- Assert.AreEqual(0, memMetrics.LargeEntriesPagesPercentage);
- Assert.Greater(memMetrics.PageFillFactor, 0);
- Assert.Greater(memMetrics.TotalAllocatedPages, 1000);
-
- sysMetrics = ignite.GetMemoryMetrics("sysMemPlc");
- Assert.AreEqual("sysMemPlc", sysMetrics.Name);
- AssertMetricsAreEmpty(sysMetrics);
-
- // Invalid name.
- Assert.IsNull(ignite.GetMemoryMetrics("boo"));
- }
-
- /// <summary>
- /// Asserts that metrics are empty.
- /// </summary>
- private static void AssertMetricsAreEmpty(IMemoryMetrics metrics)
- {
- Assert.AreEqual(0, metrics.AllocationRate);
- Assert.AreEqual(0, metrics.EvictionRate);
- Assert.AreEqual(0, metrics.LargeEntriesPagesPercentage);
- Assert.AreEqual(0, metrics.PageFillFactor);
- }
-
- /// <summary>
- /// Starts the ignite with two policies.
- /// </summary>
- private static IIgnite StartIgniteWithTwoPolicies()
- {
- var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
- {
- DataStorageConfiguration = null,
- MemoryConfiguration = new MemoryConfiguration
- {
- DefaultMemoryPolicyName = MemoryPolicyWithMetrics,
- MemoryPolicies = new[]
- {
- new MemoryPolicyConfiguration
- {
- Name = MemoryPolicyWithMetrics,
- MetricsEnabled = true
- },
- new MemoryPolicyConfiguration
- {
- Name = MemoryPolicyNoMetrics,
- MetricsEnabled = false
- }
- }
- }
- };
-
- var ignite = Ignition.Start(cfg);
-
- // Create caches and do some things with them.
- var cacheNoMetrics = ignite.CreateCache<int, int>(new CacheConfiguration("cacheNoMetrics")
- {
- MemoryPolicyName = MemoryPolicyNoMetrics
- });
-
- cacheNoMetrics.Put(1, 1);
- cacheNoMetrics.Get(1);
-
- var cacheWithMetrics = ignite.CreateCache<int, int>(new CacheConfiguration("cacheWithMetrics")
- {
- MemoryPolicyName = MemoryPolicyWithMetrics
- });
-
- cacheWithMetrics.Put(1, 1);
- cacheWithMetrics.Get(1);
-
- return ignite;
- }
-
- /// <summary>
- /// Tears down the test.
- /// </summary>
- [TearDown]
- public void TearDown()
- {
- Ignition.StopAll(true);
- }
- }
-}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTestObsolete.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTestObsolete.cs
deleted file mode 100644
index dd3d2e2ccce..00000000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTestObsolete.cs
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma warning disable 618 // Obsolete.
-namespace Apache.Ignite.Core.Tests.Cache
-{
- using System.IO;
- using Apache.Ignite.Core.Common;
- using Apache.Ignite.Core.PersistentStore;
- using NUnit.Framework;
-
- /// <summary>
- /// Tests the persistent store. Uses the obsolete API. See <see cref="PersistenceTest"/> for the actual API.
- /// </summary>
- [Category(TestUtils.CategoryIntensive)]
- public class PersistentStoreTestObsolete
- {
- /** Temp dir for WAL. */
- private readonly string _tempDir = PathUtils.GetTempDirectoryName();
-
- /// <summary>
- /// Tears down the test.
- /// </summary>
- [TearDown]
- public void TearDown()
- {
- Ignition.StopAll(true);
-
- if (Directory.Exists(_tempDir))
- {
- Directory.Delete(_tempDir, true);
- }
- }
-
- /// <summary>
- /// Tests that cache data survives node restart.
- /// </summary>
- [Test]
- public void TestCacheDataSurvivesNodeRestart()
- {
- var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
- {
- PersistentStoreConfiguration = new PersistentStoreConfiguration
- {
- PersistentStorePath = Path.Combine(_tempDir, "Store"),
- WalStorePath = Path.Combine(_tempDir, "WalStore"),
- WalArchivePath = Path.Combine(_tempDir, "WalArchive"),
- MetricsEnabled = true
- },
- DataStorageConfiguration = null
- };
-
- const string cacheName = "persistentCache";
-
- // Start Ignite, put data, stop.
- using (var ignite = Ignition.Start(cfg))
- {
- ignite.SetActive(true);
-
- var cache = ignite.CreateCache<int, int>(cacheName);
-
- cache[1] = 1;
- }
-
- // Verify directories.
- Assert.IsTrue(Directory.Exists(cfg.PersistentStoreConfiguration.PersistentStorePath));
- Assert.IsTrue(Directory.Exists(cfg.PersistentStoreConfiguration.WalStorePath));
- Assert.IsTrue(Directory.Exists(cfg.PersistentStoreConfiguration.WalArchivePath));
-
- // Start Ignite, verify data survival.
- using (var ignite = Ignition.Start(cfg))
- {
- ignite.SetActive(true);
-
- var cache = ignite.GetCache<int, int>(cacheName);
-
- Assert.AreEqual(1, cache[1]);
- }
-
- // Delete store directory.
- Directory.Delete(_tempDir, true);
-
- // Start Ignite, verify data loss.
- using (var ignite = Ignition.Start(cfg))
- {
- ignite.SetActive(true);
-
- Assert.IsFalse(ignite.GetCacheNames().Contains(cacheName));
- }
- }
-
- /// <summary>
- /// Tests the grid activation with persistence (inactive by default).
- /// </summary>
- [Test]
- public void TestGridActivationWithPersistence()
- {
- var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
- {
- PersistentStoreConfiguration = new PersistentStoreConfiguration(),
- DataStorageConfiguration = null
- };
-
- // Default config, inactive by default (IsActiveOnStart is ignored when persistence is enabled).
- using (var ignite = Ignition.Start(cfg))
- {
- CheckIsActive(ignite, false);
-
- ignite.SetActive(true);
- CheckIsActive(ignite, true);
-
- ignite.SetActive(false);
- CheckIsActive(ignite, false);
- }
- }
-
- /// <summary>
- /// Tests the grid activation without persistence (active by default).
- /// </summary>
- [Test]
- public void TestGridActivationNoPersistence()
- {
- var cfg = TestUtils.GetTestConfiguration();
- Assert.IsTrue(cfg.IsActiveOnStart);
-
- using (var ignite = Ignition.Start(cfg))
- {
- CheckIsActive(ignite, true);
-
- ignite.SetActive(false);
- CheckIsActive(ignite, false);
-
- ignite.SetActive(true);
- CheckIsActive(ignite, true);
- }
-
- cfg.IsActiveOnStart = false;
-
- using (var ignite = Ignition.Start(cfg))
- {
- CheckIsActive(ignite, false);
-
- ignite.SetActive(true);
- CheckIsActive(ignite, true);
-
- ignite.SetActive(false);
- CheckIsActive(ignite, false);
- }
- }
-
- /// <summary>
- /// Checks active state.
- /// </summary>
- private static void CheckIsActive(IIgnite ignite, bool isActive)
- {
- Assert.AreEqual(isActive, ignite.IsActive());
-
- if (isActive)
- {
- var cache = ignite.GetOrCreateCache<int, int>("default");
- cache[1] = 1;
- Assert.AreEqual(1, cache[1]);
- }
- else
- {
- var ex = Assert.Throws<IgniteException>(() => ignite.GetOrCreateCache<int, int>("default"));
- Assert.AreEqual("Can not perform the operation because the cluster is inactive.",
- ex.Message.Substring(0, 62));
- }
- }
- }
-}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
index ba7332f64fa..1c9b785f101 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
@@ -128,21 +128,10 @@
<iPluginConfiguration type='Apache.Ignite.Core.Tests.Plugin.TestIgnitePluginConfiguration, Apache.Ignite.Core.Tests' />
</pluginConfigurations>
<eventStorageSpi type='MemoryEventStorageSpi' expirationTimeout='00:00:23.45' maxEventCount='129' />
- <memoryConfiguration concurrencyLevel='3' defaultMemoryPolicyName='dfPlc' pageSize='45' systemCacheInitialSize='67' systemCacheMaxSize='68'>
- <memoryPolicies>
- <memoryPolicyConfiguration emptyPagesPoolSize='1' evictionThreshold='0.2' name='dfPlc' pageEvictionMode='RandomLru' initialSize='89' maxSize='98' swapFilePath='abc' metricsEnabled='true' rateTimeInterval='0:1:2' subIntervals='9' />
- </memoryPolicies>
- </memoryConfiguration>
<sqlConnectorConfiguration host='bar' port='10' portRange='11' socketSendBufferSize='12' socketReceiveBufferSize='13' tcpNoDelay='true' maxOpenCursorsPerConnection='14' threadPoolSize='15' />
<clientConnectorConfiguration host='bar' port='10' portRange='11' socketSendBufferSize='12' socketReceiveBufferSize='13' tcpNoDelay='true' maxOpenCursorsPerConnection='14' threadPoolSize='15' idleTimeout = "00:00:19">
<thinClientConfiguration maxActiveTxPerConnection='20' maxActiveComputeTasksPerConnection='21' />
</clientConnectorConfiguration>
- <persistentStoreConfiguration alwaysWriteFullPages='true' checkpointingFrequency='00:00:1' checkpointingPageBufferSize='2'
- checkpointingThreads='3' lockWaitTime='00:00:04' persistentStorePath='foo' tlbSize='5'
- walArchivePath='bar' walFlushFrequency='00:00:06' walFsyncDelayNanos='7' walHistorySize='8'
- walMode='None' walRecordIteratorBufferSize='9' walSegments='10' walSegmentSize='11'
- walStorePath='baz' metricsEnabled='true' rateTimeInterval='0:0:6' subIntervals='3'
- checkpointWriteOrder='Random' writeThrottlingEnabled='true' />
<consistentId type='System.String'>someId012</consistentId>
<localEventListeners>
<localEventListener type='Apache.Ignite.Core.Events.LocalEventListener`1[[Apache.Ignite.Core.Events.CacheRebalancingEvent]]'>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index f20976fcbfd..bb2d59d4563 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -52,15 +52,11 @@ namespace Apache.Ignite.Core.Tests
using Apache.Ignite.Core.Failure;
using Apache.Ignite.Core.Lifecycle;
using Apache.Ignite.Core.Log;
- using Apache.Ignite.Core.PersistentStore;
using Apache.Ignite.Core.Plugin.Cache;
using Apache.Ignite.Core.Tests.Binary;
using Apache.Ignite.Core.Tests.Plugin;
using Apache.Ignite.Core.Transactions;
using NUnit.Framework;
- using CheckpointWriteOrder = Apache.Ignite.Core.PersistentStore.CheckpointWriteOrder;
- using DataPageEvictionMode = Apache.Ignite.Core.Cache.Configuration.DataPageEvictionMode;
- using WalMode = Apache.Ignite.Core.PersistentStore.WalMode;
/// <summary>
/// Tests <see cref="IgniteConfiguration"/> serialization.
@@ -237,26 +233,6 @@ namespace Apache.Ignite.Core.Tests
Assert.AreEqual(23.45, eventStorage.ExpirationTimeout.TotalSeconds);
Assert.AreEqual(129, eventStorage.MaxEventCount);
- var memCfg = cfg.MemoryConfiguration;
- Assert.IsNotNull(memCfg);
- Assert.AreEqual(3, memCfg.ConcurrencyLevel);
- Assert.AreEqual("dfPlc", memCfg.DefaultMemoryPolicyName);
- Assert.AreEqual(45, memCfg.PageSize);
- Assert.AreEqual(67, memCfg.SystemCacheInitialSize);
- Assert.AreEqual(68, memCfg.SystemCacheMaxSize);
-
- var memPlc = memCfg.MemoryPolicies.Single();
- Assert.AreEqual(1, memPlc.EmptyPagesPoolSize);
- Assert.AreEqual(0.2, memPlc.EvictionThreshold);
- Assert.AreEqual("dfPlc", memPlc.Name);
- Assert.AreEqual(DataPageEvictionMode.RandomLru, memPlc.PageEvictionMode);
- Assert.AreEqual("abc", memPlc.SwapFilePath);
- Assert.AreEqual(89, memPlc.InitialSize);
- Assert.AreEqual(98, memPlc.MaxSize);
- Assert.IsTrue(memPlc.MetricsEnabled);
- Assert.AreEqual(9, memPlc.SubIntervals);
- Assert.AreEqual(TimeSpan.FromSeconds(62), memPlc.RateTimeInterval);
-
Assert.AreEqual(PeerAssemblyLoadingMode.CurrentAppDomain, cfg.PeerAssemblyLoadingMode);
var sql = cfg.SqlConnectorConfiguration;
@@ -284,30 +260,6 @@ namespace Apache.Ignite.Core.Tests
Assert.AreEqual(20, client.ThinClientConfiguration.MaxActiveTxPerConnection);
Assert.AreEqual(21, client.ThinClientConfiguration.MaxActiveComputeTasksPerConnection);
- var pers = cfg.PersistentStoreConfiguration;
-
- Assert.AreEqual(true, pers.AlwaysWriteFullPages);
- Assert.AreEqual(TimeSpan.FromSeconds(1), pers.CheckpointingFrequency);
- Assert.AreEqual(2, pers.CheckpointingPageBufferSize);
- Assert.AreEqual(3, pers.CheckpointingThreads);
- Assert.AreEqual(TimeSpan.FromSeconds(4), pers.LockWaitTime);
- Assert.AreEqual("foo", pers.PersistentStorePath);
- Assert.AreEqual(5, pers.TlbSize);
- Assert.AreEqual("bar", pers.WalArchivePath);
- Assert.AreEqual(TimeSpan.FromSeconds(6), pers.WalFlushFrequency);
- Assert.AreEqual(7, pers.WalFsyncDelayNanos);
- Assert.AreEqual(8, pers.WalHistorySize);
- Assert.AreEqual(WalMode.None, pers.WalMode);
- Assert.AreEqual(9, pers.WalRecordIteratorBufferSize);
- Assert.AreEqual(10, pers.WalSegments);
- Assert.AreEqual(11, pers.WalSegmentSize);
- Assert.AreEqual("baz", pers.WalStorePath);
- Assert.IsTrue(pers.MetricsEnabled);
- Assert.AreEqual(3, pers.SubIntervals);
- Assert.AreEqual(TimeSpan.FromSeconds(6), pers.RateTimeInterval);
- Assert.AreEqual(CheckpointWriteOrder.Random, pers.CheckpointWriteOrder);
- Assert.IsTrue(pers.WriteThrottlingEnabled);
-
var listeners = cfg.LocalEventListeners;
Assert.AreEqual(2, listeners.Count);
@@ -805,7 +757,6 @@ namespace Apache.Ignite.Core.Tests
{
new MyPluginConfiguration()
},
- MemoryPolicyName = "somePolicy",
PartitionLossPolicy = PartitionLossPolicy.ReadOnlyAll,
GroupName = "abc",
SqlIndexMaxInlineSize = 24,
@@ -917,38 +868,6 @@ namespace Apache.Ignite.Core.Tests
ExpirationTimeout = TimeSpan.FromMilliseconds(12345),
MaxEventCount = 257
},
- MemoryConfiguration = new MemoryConfiguration
- {
- ConcurrencyLevel = 3,
- DefaultMemoryPolicyName = "somePolicy",
- PageSize = 4,
- SystemCacheInitialSize = 5,
- SystemCacheMaxSize = 6,
- MemoryPolicies = new[]
- {
- new MemoryPolicyConfiguration
- {
- Name = "myDefaultPlc",
- PageEvictionMode = DataPageEvictionMode.Random2Lru,
- InitialSize = 245 * 1024 * 1024,
- MaxSize = 345 * 1024 * 1024,
- EvictionThreshold = 0.88,
- EmptyPagesPoolSize = 77,
- SwapFilePath = "myPath1",
- RateTimeInterval = TimeSpan.FromSeconds(22),
- SubIntervals = 99
- },
- new MemoryPolicyConfiguration
- {
- Name = "customPlc",
- PageEvictionMode = DataPageEvictionMode.RandomLru,
- EvictionThreshold = 0.77,
- EmptyPagesPoolSize = 66,
- SwapFilePath = "somePath2",
- MetricsEnabled = true
- }
- }
- },
PeerAssemblyLoadingMode = PeerAssemblyLoadingMode.CurrentAppDomain,
ClientConnectorConfiguration = new ClientConnectorConfiguration
{
@@ -970,30 +889,6 @@ namespace Apache.Ignite.Core.Tests
MaxActiveComputeTasksPerConnection = 9
}
},
- PersistentStoreConfiguration = new PersistentStoreConfiguration
- {
- AlwaysWriteFullPages = true,
- CheckpointingFrequency = TimeSpan.FromSeconds(25),
- CheckpointingPageBufferSize = 28 * 1024 * 1024,
- CheckpointingThreads = 2,
- LockWaitTime = TimeSpan.FromSeconds(5),
- PersistentStorePath = Path.GetTempPath(),
- TlbSize = 64 * 1024,
- WalArchivePath = Path.GetTempPath(),
- WalFlushFrequency = TimeSpan.FromSeconds(3),
- WalFsyncDelayNanos = 3,
- WalHistorySize = 10,
- WalMode = WalMode.Background,
- WalRecordIteratorBufferSize = 32 * 1024 * 1024,
- WalSegments = 6,
- WalSegmentSize = 5 * 1024 * 1024,
- WalStorePath = Path.GetTempPath(),
- SubIntervals = 25,
- MetricsEnabled = true,
- RateTimeInterval = TimeSpan.FromDays(1),
- CheckpointWriteOrder = CheckpointWriteOrder.Random,
- WriteThrottlingEnabled = true
- },
IsActiveOnStart = false,
ConsistentId = "myId123",
LocalEventListeners = new[]
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
index 08955e65b01..eb805e7c9c3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@ -42,11 +42,9 @@ namespace Apache.Ignite.Core.Tests
using Apache.Ignite.Core.Events;
using Apache.Ignite.Core.Impl;
using Apache.Ignite.Core.Impl.Common;
- using Apache.Ignite.Core.PersistentStore;
using Apache.Ignite.Core.Tests.Plugin;
using Apache.Ignite.Core.Transactions;
using NUnit.Framework;
- using WalMode = Apache.Ignite.Core.PersistentStore.WalMode;
/// <summary>
/// Tests code-based configuration.
@@ -69,7 +67,6 @@ namespace Apache.Ignite.Core.Tests
public void TestDefaultConfigurationProperties()
{
CheckDefaultProperties(new IgniteConfiguration());
- CheckDefaultProperties(new PersistentStoreConfiguration());
CheckDefaultProperties(new DataStorageConfiguration());
CheckDefaultProperties(new DataRegionConfiguration());
CheckDefaultProperties(new ClientConnectorConfiguration());
@@ -97,11 +94,8 @@ namespace Apache.Ignite.Core.Tests
CheckDefaultValueAttributes(new AtomicConfiguration());
CheckDefaultValueAttributes(new TransactionConfiguration());
CheckDefaultValueAttributes(new MemoryEventStorageSpi());
- CheckDefaultValueAttributes(new MemoryConfiguration());
- CheckDefaultValueAttributes(new MemoryPolicyConfiguration());
CheckDefaultValueAttributes(new SqlConnectorConfiguration());
CheckDefaultValueAttributes(new ClientConnectorConfiguration());
- CheckDefaultValueAttributes(new PersistentStoreConfiguration());
CheckDefaultValueAttributes(new IgniteClientConfiguration());
CheckDefaultValueAttributes(new TransactionClientConfiguration());
CheckDefaultValueAttributes(new QueryIndex());
@@ -565,34 +559,6 @@ namespace Apache.Ignite.Core.Tests
Assert.AreEqual(IgniteConfiguration.DefaultThreadPoolSize, cfg.QueryThreadPoolSize);
}
- /// <summary>
- /// Checks the default properties.
- /// </summary>
- /// <param name="cfg">Config.</param>
- private static void CheckDefaultProperties(PersistentStoreConfiguration cfg)
- {
- Assert.AreEqual(PersistentStoreConfiguration.DefaultTlbSize, cfg.TlbSize);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultCheckpointingFrequency, cfg.CheckpointingFrequency);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultCheckpointingThreads, cfg.CheckpointingThreads);
- Assert.AreEqual(default(long), cfg.CheckpointingPageBufferSize);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultLockWaitTime, cfg.LockWaitTime);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultWalFlushFrequency, cfg.WalFlushFrequency);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultWalFsyncDelayNanos, cfg.WalFsyncDelayNanos);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultWalHistorySize, cfg.WalHistorySize);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultWalRecordIteratorBufferSize,
- cfg.WalRecordIteratorBufferSize);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultWalSegmentSize, cfg.WalSegmentSize);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultWalSegments, cfg.WalSegments);
- Assert.AreEqual(WalMode.Default, cfg.WalMode);
- Assert.IsFalse(cfg.MetricsEnabled);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultSubIntervals, cfg.SubIntervals);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultRateTimeInterval, cfg.RateTimeInterval);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultWalStorePath, cfg.WalStorePath);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultWalArchivePath, cfg.WalArchivePath);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultCheckpointWriteOrder, cfg.CheckpointWriteOrder);
- Assert.AreEqual(PersistentStoreConfiguration.DefaultWriteThrottlingEnabled, cfg.WriteThrottlingEnabled);
- }
-
/// <summary>
/// Checks the default properties.
/// </summary>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
index d45dc14ca77..f65cf6ad5bf 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
@@ -827,18 +827,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public ICollection<ICachePluginConfiguration> PluginConfigurations { get; set; }
- /// <summary>
- /// Gets or sets the name of the <see cref="MemoryPolicyConfiguration"/> for this cache.
- /// See <see cref="IgniteConfiguration.MemoryConfiguration"/>.
- /// </summary>
- [Obsolete("Use DataRegionName.")]
- [XmlIgnore]
- public string MemoryPolicyName
- {
- get { return DataRegionName; }
- set { DataRegionName = value; }
- }
-
/// <summary>
/// Gets or sets the name of the data region, see <see cref="DataRegionConfiguration"/>.
/// </summary>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/DataPageEvictionMode.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/DataPageEvictionMode.cs
deleted file mode 100644
index 57e60d9df2f..00000000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/DataPageEvictionMode.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Cache.Configuration
-{
- using System;
-
- /// <summary>
- /// Memory page eviction mode.
- /// Only data pages, that store key-value entries, are eligible for eviction.
- /// The other types of pages, like index or system pages, are not evictable.
- /// </summary>
- [Obsolete("Use Apache.Ignite.Core.Configuration.DataPageEvictionMode")]
- public enum DataPageEvictionMode
- {
- /// <summary>
- /// Eviction is disabled.
- /// </summary>
- Disabled,
-
- /// <summary>
- /// Random-LRU algorithm.
- /// <para />
- /// Once a memory region defined by a memory policy is configured, an off-heap array is allocated to track
- /// last usage timestamp for every individual data page. The size of the array equals to
- /// <see cref="MemoryPolicyConfiguration.MaxSize"/> / <see cref="MemoryConfiguration.PageSize"/>.
- /// <para />
- /// When a data page is accessed, its timestamp gets updated in the tracking array. The page index in the
- /// tracking array equals to pageAddress / <see cref="MemoryPolicyConfiguration.MaxSize"/>.
- /// <para />
- /// When some pages need to be evicted, the algorithm randomly chooses 5 indexes from the tracking array and
- /// evicts a page with the latest timestamp. If some of the indexes point to non-data pages
- /// (index or system pages) then the algorithm picks other pages.
- /// </summary>
- RandomLru,
-
- /// <summary>
- /// Activates Random-2-LRU algorithm which is a scan resistant version of Random-LRU.
- /// <para />
- /// This algorithm differs from Random-LRU only in a way that two latest access timestamps are stored for every
- /// data page. At the eviction time, a minimum between two latest timestamps is taken for further
- /// comparison with minimums of other pages that might be evicted. LRU-2 outperforms LRU by
- /// resolving "one-hit wonder" problem - if a data page is accessed rarely, but accidentally accessed once,
- /// its protected from eviction for a long time.
- /// </summary>
- Random2Lru
- }
-}
\ No newline at end of file
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/MemoryConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/MemoryConfiguration.cs
deleted file mode 100644
index c735b3c3960..00000000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/MemoryConfiguration.cs
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Cache.Configuration
-{
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Diagnostics;
- using System.Diagnostics.CodeAnalysis;
- using System.Linq;
- using Apache.Ignite.Core.Binary;
- using Apache.Ignite.Core.Common;
- using Apache.Ignite.Core.Configuration;
- using Apache.Ignite.Core.Impl.Common;
-
- /// <summary>
- /// A page memory configuration for an Apache Ignite node. The page memory is a manageable off-heap based
- /// memory architecture that divides all continuously allocated memory regions into pages of fixed size.
- /// An individual page can store one or many cache key-value entries that allows reusing the memory
- /// in the most efficient way and avoid memory fragmentation issues.
- /// <para />
- /// By default, the page memory allocates a single continuous memory region. All the caches that
- /// will be configured in an application will be mapped to this memory region by default,
- /// thus, all the cache data will reside in that memory region.
- /// <para />
- /// If initial size of the default memory region doesn't satisfy requirements or it's
- /// required to have multiple memory regions with different properties
- /// then <see cref="MemoryPolicyConfiguration" /> can be used for both scenarios.
- /// For instance, using memory policies you can define memory regions of different maximum size,
- /// eviction policies, swapping options, etc. Once you define a new memory region you can bind
- /// particular Ignite caches to it. <para />
- /// To learn more about memory policies refer to <see cref="MemoryPolicyConfiguration" /> documentation.
- /// <para />
- /// Obsolete, use <see cref="DataStorageConfiguration"/>.
- /// </summary>
- [Obsolete("Use DataStorageConfiguration.")]
- public class MemoryConfiguration
- {
- /// <summary>
- /// Default size of a memory chunk reserved for system cache initially.
- /// </summary>
- public const long DefaultSystemCacheInitialSize = 40 * 1024 * 1024;
-
- /// <summary>
- /// Default max size of a memory chunk for the system cache.
- /// </summary>
- public const long DefaultSystemCacheMaxSize = 100 * 1024 * 1024;
-
- /// <summary>
- /// The default page size.
- /// </summary>
- public const int DefaultPageSize = 4 * 1024;
-
- /// <summary>
- /// The default value for <see cref="DefaultMemoryPolicyName"/>.
- /// </summary>
- public const string DefaultDefaultMemoryPolicyName = "default";
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MemoryConfiguration"/> class.
- /// </summary>
- public MemoryConfiguration()
- {
- SystemCacheInitialSize = DefaultSystemCacheInitialSize;
- SystemCacheMaxSize = DefaultSystemCacheMaxSize;
- PageSize = DefaultPageSize;
- DefaultMemoryPolicyName = DefaultDefaultMemoryPolicyName;
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MemoryConfiguration"/> class.
- /// </summary>
- /// <param name="reader">The reader.</param>
- public MemoryConfiguration(IBinaryRawReader reader) // Should be internal.
- {
- IgniteArgumentCheck.NotNull(reader, "reader");
-
- SystemCacheInitialSize = reader.ReadLong();
- SystemCacheMaxSize = reader.ReadLong();
- PageSize = reader.ReadInt();
- ConcurrencyLevel = reader.ReadInt();
- DefaultMemoryPolicyName = reader.ReadString();
-
- var count = reader.ReadInt();
-
- if (count > 0)
- {
- MemoryPolicies = Enumerable.Range(0, count)
- .Select(x => new MemoryPolicyConfiguration(reader))
- .ToArray();
- }
- }
-
- /// <summary>
- /// Writes this instance to a writer.
- /// </summary>
- /// <param name="writer">The writer.</param>
- internal void Write(IBinaryRawWriter writer)
- {
- Debug.Assert(writer != null);
-
- writer.WriteLong(SystemCacheInitialSize);
- writer.WriteLong(SystemCacheMaxSize);
- writer.WriteInt(PageSize);
- writer.WriteInt(ConcurrencyLevel);
- writer.WriteString(DefaultMemoryPolicyName);
-
- if (MemoryPolicies != null)
- {
- writer.WriteInt(MemoryPolicies.Count);
-
- foreach (var policy in MemoryPolicies)
- {
- if (policy == null)
- {
- throw new IgniteException("MemoryConfiguration.MemoryPolicies must not contain null items.");
- }
-
- policy.Write(writer);
- }
- }
- else
- {
- writer.WriteInt(0);
- }
- }
-
- /// <summary>
- /// Gets or sets the size of a memory chunk reserved for system cache needs.
- /// </summary>
- [DefaultValue(DefaultSystemCacheInitialSize)]
- public long SystemCacheInitialSize { get; set; }
-
- /// <summary>
- /// Gets or sets the maximum memory region size reserved for system cache.
- /// </summary>
- [DefaultValue(DefaultSystemCacheMaxSize)]
- public long SystemCacheMaxSize { get; set; }
-
- /// <summary>
- /// Gets or sets the size of the memory page.
- /// </summary>
- [DefaultValue(DefaultPageSize)]
- public int PageSize { get; set; }
-
- /// <summary>
- /// Gets or sets the number of concurrent segments in Ignite internal page mapping tables.
- /// </summary>
- public int ConcurrencyLevel { get;set; }
-
- /// <summary>
- /// Gets or sets the name of the default memory policy in <see cref="MemoryPolicies"/>.
- /// </summary>
- [DefaultValue(DefaultDefaultMemoryPolicyName)]
- public string DefaultMemoryPolicyName { get; set; }
-
- /// <summary>
- /// Gets or sets the memory policies.
- /// </summary>
- [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
- public ICollection<MemoryPolicyConfiguration> MemoryPolicies { get; set; }
- }
-}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/MemoryPolicyConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/MemoryPolicyConfiguration.cs
deleted file mode 100644
index 00e66476d7b..00000000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/MemoryPolicyConfiguration.cs
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Cache.Configuration
-{
- using System;
- using System.ComponentModel;
- using System.Diagnostics.CodeAnalysis;
- using Apache.Ignite.Core.Binary;
- using Apache.Ignite.Core.Configuration;
- using Apache.Ignite.Core.Impl;
- using Apache.Ignite.Core.Impl.Binary;
-
- /// <summary>
- /// Defines page memory policy configuration. See <see cref="MemoryConfiguration.MemoryPolicies"/>.
- /// Obsolete, use <see cref="DataRegionConfiguration"/>.
- /// </summary>
- [Obsolete("Use DataRegionConfiguration.")]
- public class MemoryPolicyConfiguration
- {
- /// <summary>
- /// The default eviction threshold.
- /// </summary>
- public const double DefaultEvictionThreshold = 0.9;
-
- /// <summary>
- /// The default empty pages pool size.
- /// </summary>
- public const int DefaultEmptyPagesPoolSize = 100;
-
- /// <summary>
- /// The default initial size.
- /// </summary>
- public const long DefaultInitialSize = 256 * 1024 * 1024;
-
- /// <summary>
- /// The default maximum size, equals to 20% of total RAM.
- /// </summary>
- public static readonly long DefaultMaxSize =
- (long) ((long) (MemoryInfo.MemoryLimit ?? 2048L * 1024 * 1024) * 0.2);
-
- /// <summary>
- /// The default sub intervals.
- /// </summary>
- [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly",
- Justification = "Consistency with Java config")]
- public const int DefaultSubIntervals = 5;
-
- /// <summary>
- /// The default rate time interval.
- /// </summary>
- public static readonly TimeSpan DefaultRateTimeInterval = TimeSpan.FromSeconds(60);
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MemoryPolicyConfiguration"/> class.
- /// </summary>
- public MemoryPolicyConfiguration()
- {
- EvictionThreshold = DefaultEvictionThreshold;
- EmptyPagesPoolSize = DefaultEmptyPagesPoolSize;
- Name = MemoryConfiguration.DefaultDefaultMemoryPolicyName;
- InitialSize = DefaultInitialSize;
- MaxSize = DefaultMaxSize;
- SubIntervals = DefaultSubIntervals;
- RateTimeInterval = DefaultRateTimeInterval;
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MemoryPolicyConfiguration"/> class.
- /// </summary>
- /// <param name="reader">The reader.</param>
- internal MemoryPolicyConfiguration(IBinaryRawReader reader)
- {
- Name = reader.ReadString();
- InitialSize = reader.ReadLong();
- MaxSize = reader.ReadLong();
- SwapFilePath = reader.ReadString();
- PageEvictionMode = (DataPageEvictionMode) reader.ReadInt();
- EvictionThreshold = reader.ReadDouble();
- EmptyPagesPoolSize = reader.ReadInt();
- MetricsEnabled = reader.ReadBoolean();
- SubIntervals = reader.ReadInt();
- RateTimeInterval = reader.ReadLongAsTimespan();
- }
-
- /// <summary>
- /// Writes this instance to a writer.
- /// </summary>
- internal void Write(IBinaryRawWriter writer)
- {
- writer.WriteString(Name);
- writer.WriteLong(InitialSize);
- writer.WriteLong(MaxSize);
- writer.WriteString(SwapFilePath);
- writer.WriteInt((int) PageEvictionMode);
- writer.WriteDouble(EvictionThreshold);
- writer.WriteInt(EmptyPagesPoolSize);
- writer.WriteBoolean(MetricsEnabled);
- writer.WriteInt(SubIntervals);
- writer.WriteTimeSpanAsLong(RateTimeInterval);
- }
-
- /// <summary>
- /// Gets or sets the memory policy name.
- /// Defaults to <see cref="MemoryConfiguration.DefaultDefaultMemoryPolicyName"/>.
- /// </summary>
- [DefaultValue(MemoryConfiguration.DefaultDefaultMemoryPolicyName)]
- public string Name { get; set; }
-
- /// <summary>
- /// Gets or sets initial memory region size defined by this memory policy.
- /// When the used memory size exceeds this value, new chunks of memory will be allocated.
- /// </summary>
- [DefaultValue(DefaultInitialSize)]
- public long InitialSize { get; set; }
-
- /// <summary>
- /// Sets maximum memory region size defined by this memory policy. The total size should not be less
- /// than 10 MB due to internal data structures overhead.
- /// </summary>
- public long MaxSize { get; set; }
-
- /// <summary>
- /// Gets or sets the the path to the memory-mapped file the memory region defined by this memory policy
- /// will be mapped to. Having the path set, allows relying on swapping capabilities of an underlying
- /// operating system for the memory region.
- /// <para />
- /// Null for no swap.
- /// </summary>
- public string SwapFilePath { get; set; }
-
- /// <summary>
- /// Gets or sets the page eviction mode. If <see cref="DataPageEvictionMode.Disabled"/> is used (default)
- /// then an out of memory exception will be thrown if the memory region usage,
- /// defined by this memory policy, goes beyond <see cref="MaxSize"/>.
- /// </summary>
- public DataPageEvictionMode PageEvictionMode { get; set; }
-
- /// <summary>
- /// Gets or sets the threshold for memory pages eviction initiation. For instance, if the threshold is 0.9
- /// it means that the page memory will start the eviction only after 90% of the memory region
- /// (defined by this policy) is occupied.
- /// </summary>
- [DefaultValue(DefaultEvictionThreshold)]
- public double EvictionThreshold { get; set; }
-
- /// <summary>
- /// Gets or sets the minimal number of empty pages to be present in reuse lists for this memory policy.
- /// This parameter ensures that Ignite will be able to successfully evict old data entries when the size of
- /// (key, value) pair is slightly larger than page size / 2.
- /// Increase this parameter if cache can contain very big entries (total size of pages in this pool
- /// should be enough to contain largest cache entry).
- /// </summary>
- [DefaultValue(DefaultEmptyPagesPoolSize)]
- public int EmptyPagesPoolSize { get;set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether memory metrics should be enabled.
- /// <para />
- /// Metrics can be retrieved with <see cref="IIgnite.GetMemoryMetrics()"/> method.
- /// </summary>
- public bool MetricsEnabled { get; set; }
-
- /// <summary>
- /// Gets or sets the rate time interval for <see cref="IMemoryMetrics.AllocationRate"/>
- /// and <see cref="IMemoryMetrics.EvictionRate"/> monitoring purposes.
- /// <para />
- /// For instance, after setting the interval to 60 seconds, subsequent calls
- /// to <see cref="IMemoryMetrics.AllocationRate"/> will return average allocation
- /// rate (pages per second) for the last minute.
- /// </summary>
- [DefaultValue(typeof(TimeSpan), "00:01:00")]
- public TimeSpan RateTimeInterval { get; set; }
-
- /// <summary>
- /// Gets or sets the number of sub intervals to split <see cref="RateTimeInterval"/> into to calculate
- /// <see cref="IMemoryMetrics.AllocationRate"/> and <see cref="IMemoryMetrics.EvictionRate"/>.
- /// <para />
- /// Bigger value results in more accurate metrics.
- /// </summary>
- [DefaultValue(DefaultSubIntervals)]
- [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly",
- Justification = "Consistency with Java config")]
- public int SubIntervals { get; set; }
- }
-}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs
index 81d1b91e429..8d31e48045d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs
@@ -447,7 +447,7 @@ namespace Apache.Ignite.Core.Configuration
/// <summary>
/// Gets or sets a value indicating whether to enable data storage metrics.
- /// See <see cref="IIgnite.GetMemoryMetrics()"/>.
+ /// See <see cref="IIgnite.GetDataRegionMetrics()"/>.
/// </summary>
public bool MetricsEnabled { get; set; }
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IIgnite.cs b/modules/platforms/dotnet/Apache.Ignite.Core/IIgnite.cs
index 48cd529c0db..f824e57d4eb 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IIgnite.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IIgnite.cs
@@ -389,28 +389,6 @@ namespace Apache.Ignite.Core
/// <param name="cacheNames">Names of caches to reset partitions for.</param>
void ResetLostPartitions(params string[] cacheNames);
- /// <summary>
- /// Gets a collection of memory metrics, one for each <see cref="MemoryConfiguration.MemoryPolicies"/>.
- /// <para />
- /// Memory metrics should be enabled with <see cref="MemoryPolicyConfiguration.MetricsEnabled"/>.
- /// <para />
- /// Obsolete, use <see cref="GetDataRegionMetrics()"/>.
- /// </summary>
- [Obsolete("Use GetDataRegionMetrics.")]
- ICollection<IMemoryMetrics> GetMemoryMetrics();
-
- /// <summary>
- /// Gets the memory metrics for the specified memory policy.
- /// <para />
- /// To get metrics for the default memory region,
- /// use <see cref="MemoryConfiguration.DefaultMemoryPolicyName"/>.
- /// <para />
- /// Obsolete, use <see cref="GetDataRegionMetrics(string)"/>.
- /// </summary>
- /// <param name="memoryPolicyName">Name of the memory policy.</param>
- [Obsolete("Use GetDataRegionMetrics.")]
- IMemoryMetrics GetMemoryMetrics(string memoryPolicyName);
-
/// <summary>
/// Changes Ignite grid state to active or inactive.
/// </summary>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
index cd252fa1c33..401500d5255 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@ -49,7 +49,6 @@ namespace Apache.Ignite.Core
using Apache.Ignite.Core.Impl.Ssl;
using Apache.Ignite.Core.Lifecycle;
using Apache.Ignite.Core.Log;
- using Apache.Ignite.Core.PersistentStore;
using Apache.Ignite.Core.Plugin;
using Apache.Ignite.Core.Ssl;
using Apache.Ignite.Core.Transactions;
@@ -500,18 +499,6 @@ namespace Apache.Ignite.Core
memEventStorage.Write(writer);
}
-#pragma warning disable 618 // Obsolete
- if (MemoryConfiguration != null)
- {
- writer.WriteBoolean(true);
- MemoryConfiguration.Write(writer);
- }
- else
- {
- writer.WriteBoolean(false);
- }
-#pragma warning restore 618
-
// SQL connector.
#pragma warning disable 618 // Obsolete
if (SqlConnectorConfiguration != null)
@@ -538,19 +525,6 @@ namespace Apache.Ignite.Core
writer.WriteBoolean(ClientConnectorConfigurationEnabled);
- // Persistence.
-#pragma warning disable 618 // Obsolete
- if (PersistentStoreConfiguration != null)
- {
- writer.WriteBoolean(true);
- PersistentStoreConfiguration.Write(writer);
- }
- else
- {
- writer.WriteBoolean(false);
- }
-#pragma warning restore 618
-
// Data storage.
if (DataStorageConfiguration != null)
{
@@ -819,13 +793,6 @@ namespace Apache.Ignite.Core
break;
}
- if (r.ReadBoolean())
- {
-#pragma warning disable 618 // Obsolete
- MemoryConfiguration = new MemoryConfiguration(r);
-#pragma warning restore 618 // Obsolete
- }
-
// SQL.
if (r.ReadBoolean())
{
@@ -842,14 +809,6 @@ namespace Apache.Ignite.Core
ClientConnectorConfigurationEnabled = r.ReadBoolean();
- // Persistence.
- if (r.ReadBoolean())
- {
-#pragma warning disable 618 // Obsolete
- PersistentStoreConfiguration = new PersistentStoreConfiguration(r);
-#pragma warning restore 618
- }
-
// Data storage.
if (r.ReadBoolean())
{
@@ -1416,15 +1375,6 @@ namespace Apache.Ignite.Core
/// </summary>
public IEventStorageSpi EventStorageSpi { get; set; }
- /// <summary>
- /// Gets or sets the page memory configuration.
- /// <see cref="MemoryConfiguration"/> for more details.
- /// <para />
- /// Obsolete, use <see cref="DataStorageConfiguration"/>.
- /// </summary>
- [Obsolete("Use DataStorageConfiguration.")]
- public MemoryConfiguration MemoryConfiguration { get; set; }
-
/// <summary>
/// Gets or sets the data storage configuration.
/// </summary>
@@ -1564,14 +1514,6 @@ namespace Apache.Ignite.Core
set { _longQueryWarningTimeout = value; }
}
- /// <summary>
- /// Gets or sets the persistent store configuration.
- /// <para />
- /// Obsolete, use <see cref="DataStorageConfiguration"/>.
- /// </summary>
- [Obsolete("Use DataStorageConfiguration.")]
- public PersistentStoreConfiguration PersistentStoreConfiguration { get; set; }
-
/// <summary>
/// Gets or sets a value indicating whether grid should be active on start.
/// See also <see cref="ICluster.IsActive"/> and <see cref="ICluster.SetActive"/>.
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index 9dd4779dd99..b08004c1f58 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -1399,103 +1399,6 @@
</xs:attribute>
</xs:complexType>
</xs:element>
- <xs:element name="memoryConfiguration" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Page memory configuration.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element name="memoryPolicies" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation>Memory policies.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element name="memoryPolicyConfiguration" minOccurs="0" maxOccurs="unbounded">
- <xs:complexType>
- <xs:attribute name="emptyPagesPoolSize" type="xs:int">
- <xs:annotation>
- <xs:documentation>Minimal number of empty pages to be present in reuse lists for this memory policy.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="evictionThreshold" type="xs:double">
- <xs:annotation>
- <xs:documentation>Threshold for memory pages eviction initiation. For instance, if the threshold is 0.9 it means that the page memory will start the eviction only after 90% of the memory region (defined by this policy) is occupied.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="name" type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation>Memory policy name.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="pageEvictionMode" type="dataPageEvictionMode">
- <xs:annotation>
- <xs:documentation>Page eviction mode.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="initialSize" type="xs:long">
- <xs:annotation>
- <xs:documentation>Initial memory region size defined by this memory policy.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="maxSize" type="xs:long">
- <xs:annotation>
- <xs:documentation>Maximum memory region size defined by this memory policy.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="swapFilePath" type="xs:string">
- <xs:annotation>
- <xs:documentation>Path to the memory-mapped file the memory region defined by this memory policy will be mapped to.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="metricsEnabled" type="xs:boolean">
- <xs:annotation>
- <xs:documentation>Enable memory metrics.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="subIntervals" type="xs:int">
- <xs:annotation>
- <xs:documentation>Number of sub intervals to split RateTimeInterval into.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="rateTimeInterval" type="xs:string">
- <xs:annotation>
- <xs:documentation>Rate time interval for AllocationRate and EvictionRate monitoring.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="concurrencyLevel" type="xs:int">
- <xs:annotation>
- <xs:documentation>Number of concurrent segments in Ignite internal page mapping tables.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="defaultMemoryPolicyName" type="xs:string">
- <xs:annotation>
- <xs:documentation>Name of the default memory policy in MemoryPolicies.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="pageSize" type="xs:int">
- <xs:annotation>
- <xs:documentation>Size of the memory page.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="systemCacheInitialSize" type="xs:int">
- <xs:annotation>
- <xs:documentation>Initial size of a memory chunk reserved for system cache needs.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="systemCacheMaxSize" type="xs:int">
- <xs:annotation>
- <xs:documentation>Maximum size of a memory chunk reserved for system cache needs.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
<xs:element name="sqlConnectorConfiguration" minOccurs="0">
<xs:annotation>
<xs:documentation>SQL connector configuration (JDBC and ODBC).</xs:documentation>
@@ -1639,118 +1542,6 @@
</xs:attribute>
</xs:complexType>
</xs:element>
- <xs:element name="persistentStoreConfiguration" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Persistent store configuration. Obsolete, use DataStorageConfiguration.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:attribute name="persistentStorePath" type="xs:string">
- <xs:annotation>
- <xs:documentation>Path where data and indexes will be persisted.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="checkpointingFrequency" type="xs:string">
- <xs:annotation>
- <xs:documentation>Checkpointing frequency which is a minimal interval when the dirty pages will be written to the Persistent Store.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="checkpointingPageBufferSize" type="xs:long">
- <xs:annotation>
- <xs:documentation>Size of the checkpointing page buffer.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="checkpointingThreads" type="xs:int">
- <xs:annotation>
- <xs:documentation>Number of threads for checkpointing.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="lockWaitTime" type="xs:string">
- <xs:annotation>
- <xs:documentation>Persistent manager file lock wait time.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="walHistorySize" type="xs:int">
- <xs:annotation>
- <xs:documentation>Number of checkpoints to store in WAL (Write Ahead Log) history.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="walSegments" type="xs:int">
- <xs:annotation>
- <xs:documentation>Number of WAL (Write Ahead Log) segments to work with.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="walSegmentSize" type="xs:int">
- <xs:annotation>
- <xs:documentation>Size of the WAL (Write Ahead Log) segment.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="walStorePath" type="xs:string">
- <xs:annotation>
- <xs:documentation>Path to the directory where WAL (Write Ahead Log) is stored.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="walArchivePath" type="xs:string">
- <xs:annotation>
- <xs:documentation>Path to the directory where WAL (Write Ahead Log) archive is stored.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="walMode" type="walMode">
- <xs:annotation>
- <xs:documentation>WAL (Write Ahead Log) mode.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="tlbSize" type="xs:int">
- <xs:annotation>
- <xs:documentation>Size of the TLB (Thread-Local Buffer), in bytes.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="walFlushFrequency" type="xs:string">
- <xs:annotation>
- <xs:documentation>WAL (Write Ahead Log) flush frequency.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="walFsyncDelayNanos" type="xs:int">
- <xs:annotation>
- <xs:documentation>WAL (Write Ahead Log) fsync (disk sync) delay, in nanoseconds.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="walRecordIteratorBufferSize" type="xs:int">
- <xs:annotation>
- <xs:documentation>Size of the WAL (Write Ahead Log) record iterator buffer, in bytes.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="alwaysWriteFullPages" type="xs:boolean">
- <xs:annotation>
- <xs:documentation>Whether full pages should always be written.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="metricsEnabled" type="xs:boolean">
- <xs:annotation>
- <xs:documentation>Enable persistent store metrics.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="subIntervals" type="xs:int">
- <xs:annotation>
- <xs:documentation>Number of sub intervals to split RateTimeInterval into.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="rateTimeInterval" type="xs:string">
- <xs:annotation>
- <xs:documentation>Rate time interval.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="checkpointWriteOrder" type="checkpointWriteOrder">
- <xs:annotation>
- <xs:documentation>Checkpoint page write order on disk.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="writeThrottlingEnabled" type="xs:boolean">
- <xs:annotation>
- <xs:documentation>Threads that generate dirty pages too fast during ongoing checkpoint will be throttled.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
<xs:element name="dataStorageConfiguration" minOccurs="0">
<xs:annotation>
<xs:documentation>Data storage configuration.</xs:documentation>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/PersistentStore/PersistentStoreConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/PersistentStore/PersistentStoreConfiguration.cs
deleted file mode 100644
index aec4c3ae549..00000000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/PersistentStore/PersistentStoreConfiguration.cs
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.PersistentStore
-{
- using System;
- using System.ComponentModel;
- using System.Diagnostics;
- using System.Diagnostics.CodeAnalysis;
- using Apache.Ignite.Core.Binary;
- using Apache.Ignite.Core.Configuration;
- using Apache.Ignite.Core.Impl.Binary;
-
- /// <summary>
- /// Configures Apache Ignite persistent store.
- /// <para />
- /// Obsolete, use <see cref="DataStorageConfiguration"/>.
- /// </summary>
- [Obsolete("Use DataStorageConfiguration.")]
- public class PersistentStoreConfiguration
- {
- /// <summary>
- /// Default value for <see cref="CheckpointingThreads"/>.
- /// </summary>
- public const int DefaultCheckpointingThreads = 4;
-
- /// <summary>
- /// Default value for <see cref="CheckpointingFrequency"/>.
- /// </summary>
- public static readonly TimeSpan DefaultCheckpointingFrequency = TimeSpan.FromSeconds(180);
-
- /// <summary>
- /// Default value for <see cref="LockWaitTime"/>.
- /// </summary>
- public static readonly TimeSpan DefaultLockWaitTime = TimeSpan.FromSeconds(10);
-
- /// <summary>
- /// Default value for <see cref="WalHistorySize"/>.
- /// </summary>
- public const int DefaultWalHistorySize = 20;
-
- /// <summary>
- /// Default value for <see cref="WalSegments"/>.
- /// </summary>
- public const int DefaultWalSegments = 10;
-
- /// <summary>
- /// Default value for <see cref="WalSegmentSize"/>.
- /// </summary>
- public const int DefaultWalSegmentSize = 64 * 1024 * 1024;
-
- /// <summary>
- /// Default value for <see cref="TlbSize"/>.
- /// </summary>
- public const int DefaultTlbSize = 128 * 1024;
-
- /// <summary>
- /// Default value for <see cref="WalFlushFrequency"/>.
- /// </summary>
- public static readonly TimeSpan DefaultWalFlushFrequency = TimeSpan.FromSeconds(2);
-
- /// <summary>
- /// Default value for <see cref="WalRecordIteratorBufferSize"/>.
- /// </summary>
- public const int DefaultWalRecordIteratorBufferSize = 64 * 1024 * 1024;
-
- /// <summary>
- /// Default value for <see cref="WalFsyncDelayNanos"/>.
- /// </summary>
- public const long DefaultWalFsyncDelayNanos = 1000;
-
- /// <summary>
- /// The default sub intervals.
- /// </summary>
- [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly",
- Justification = "Consistency with Java config")]
- public const int DefaultSubIntervals = 5;
-
- /// <summary>
- /// The default rate time interval.
- /// </summary>
- public static readonly TimeSpan DefaultRateTimeInterval = TimeSpan.FromSeconds(60);
-
- /// <summary>
- /// Default value for <see cref="WalStorePath"/>.
- /// </summary>
- public const string DefaultWalStorePath = "db/wal";
-
- /// <summary>
- /// Default value for <see cref="WalArchivePath"/>.
- /// </summary>
- public const string DefaultWalArchivePath = "db/wal/archive";
-
- /// <summary>
- /// Default value for <see cref="CheckpointWriteOrder"/>.
- /// </summary>
- public const CheckpointWriteOrder DefaultCheckpointWriteOrder = CheckpointWriteOrder.Sequential;
-
- /// <summary>
- /// Default value for <see cref="WriteThrottlingEnabled"/>.
- /// </summary>
- public const bool DefaultWriteThrottlingEnabled = false;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="PersistentStoreConfiguration"/> class.
- /// </summary>
- public PersistentStoreConfiguration()
- {
- CheckpointingThreads = DefaultCheckpointingThreads;
- CheckpointingFrequency = DefaultCheckpointingFrequency;
- LockWaitTime = DefaultLockWaitTime;
- WalHistorySize = DefaultWalHistorySize;
- WalSegments = DefaultWalSegments;
- WalSegmentSize = DefaultWalSegmentSize;
- TlbSize = DefaultTlbSize;
- WalFlushFrequency = DefaultWalFlushFrequency;
- WalRecordIteratorBufferSize = DefaultWalRecordIteratorBufferSize;
- WalFsyncDelayNanos = DefaultWalFsyncDelayNanos;
- RateTimeInterval = DefaultRateTimeInterval;
- SubIntervals = DefaultSubIntervals;
- WalArchivePath = DefaultWalArchivePath;
- WalStorePath = DefaultWalStorePath;
- CheckpointWriteOrder = DefaultCheckpointWriteOrder;
- WriteThrottlingEnabled = DefaultWriteThrottlingEnabled;
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="PersistentStoreConfiguration"/> class.
- /// </summary>
- /// <param name="reader">The reader.</param>
- internal PersistentStoreConfiguration(IBinaryRawReader reader)
- {
- Debug.Assert(reader != null);
-
- PersistentStorePath = reader.ReadString();
- CheckpointingFrequency = reader.ReadLongAsTimespan();
- CheckpointingPageBufferSize = reader.ReadLong();
- CheckpointingThreads = reader.ReadInt();
- LockWaitTime = reader.ReadLongAsTimespan();
- WalHistorySize = reader.ReadInt();
- WalSegments = reader.ReadInt();
- WalSegmentSize = reader.ReadInt();
- WalStorePath = reader.ReadString();
- WalArchivePath = reader.ReadString();
- WalMode = (WalMode)reader.ReadInt();
- TlbSize = reader.ReadInt();
- WalFlushFrequency = reader.ReadLongAsTimespan();
- WalFsyncDelayNanos = reader.ReadLong();
- WalRecordIteratorBufferSize = reader.ReadInt();
- AlwaysWriteFullPages = reader.ReadBoolean();
- MetricsEnabled = reader.ReadBoolean();
- SubIntervals = reader.ReadInt();
- RateTimeInterval = reader.ReadLongAsTimespan();
- CheckpointWriteOrder = (CheckpointWriteOrder) reader.ReadInt();
- WriteThrottlingEnabled = reader.ReadBoolean();
- }
-
- /// <summary>
- /// Writes this instance to the specified writer.
- /// </summary>
- /// <param name="writer">The writer.</param>
- internal void Write(IBinaryRawWriter writer)
- {
- Debug.Assert(writer != null);
-
- writer.WriteString(PersistentStorePath);
- writer.WriteTimeSpanAsLong(CheckpointingFrequency);
- writer.WriteLong(CheckpointingPageBufferSize);
- writer.WriteInt(CheckpointingThreads);
- writer.WriteTimeSpanAsLong(LockWaitTime);
- writer.WriteInt(WalHistorySize);
- writer.WriteInt(WalSegments);
- writer.WriteInt(WalSegmentSize);
- writer.WriteString(WalStorePath);
- writer.WriteString(WalArchivePath);
- writer.WriteInt((int)WalMode);
- writer.WriteInt(TlbSize);
- writer.WriteTimeSpanAsLong(WalFlushFrequency);
- writer.WriteLong(WalFsyncDelayNanos);
- writer.WriteInt(WalRecordIteratorBufferSize);
- writer.WriteBoolean(AlwaysWriteFullPages);
- writer.WriteBoolean(MetricsEnabled);
- writer.WriteInt(SubIntervals);
- writer.WriteTimeSpanAsLong(RateTimeInterval);
- writer.WriteInt((int) CheckpointWriteOrder);
- writer.WriteBoolean(WriteThrottlingEnabled);
- }
-
- /// <summary>
- /// Gets or sets the path where data and indexes will be persisted.
- /// </summary>
- public string PersistentStorePath { get; set; }
-
- /// <summary>
- /// Gets or sets the checkpointing frequency which is a minimal interval when the dirty pages will be written
- /// to the Persistent Store.
- /// </summary>
- [DefaultValue(typeof(TimeSpan), "00:03:00")]
- public TimeSpan CheckpointingFrequency { get; set; }
-
- /// <summary>
- /// Gets or sets the size of the checkpointing page buffer.
- /// <para />
- /// Default is <c>0</c>: Ignite will choose buffer size automatically.
- /// </summary>
- public long CheckpointingPageBufferSize { get; set; }
-
- /// <summary>
- /// Gets or sets the number of threads for checkpointing.
- /// </summary>
- [DefaultValue(DefaultCheckpointingThreads)]
- public int CheckpointingThreads { get; set; }
-
- /// <summary>
- /// Gets or sets the persistent manager file lock wait time.
- /// </summary>
- [DefaultValue(typeof(TimeSpan), "00:00:10")]
- public TimeSpan LockWaitTime { get; set; }
-
- /// <summary>
- /// Gets or sets the number of checkpoints to store in WAL (Write Ahead Log) history.
- /// </summary>
- [DefaultValue(DefaultWalHistorySize)]
- public int WalHistorySize { get; set; }
-
- /// <summary>
- /// Gets or sets a number of WAL (Write Ahead Log) segments to work with.
- /// For performance reasons, the whole WAL is split into files of fixed length called segments.
- /// </summary>
- [DefaultValue(DefaultWalSegments)]
- public int WalSegments { get; set; }
-
- /// <summary>
- /// Gets or sets the size of the WAL (Write Ahead Log) segment.
- /// For performance reasons, the whole WAL is split into files of fixed length called segments.
- /// </summary>
- [DefaultValue(DefaultWalSegmentSize)]
- public int WalSegmentSize { get; set; }
-
- /// <summary>
- /// Gets or sets the path to the directory where WAL (Write Ahead Log) is stored.
- /// </summary>
- [DefaultValue(DefaultWalStorePath)]
- public string WalStorePath { get; set; }
-
- /// <summary>
- /// Gets or sets the path to the directory where WAL (Write Ahead Log) archive is stored.
- /// Every WAL segment will be fully copied to this directory before it can be reused for WAL purposes.
- /// </summary>
- [DefaultValue(DefaultWalArchivePath)]
- public string WalArchivePath { get; set; }
-
- /// <summary>
- /// Gets or sets the WAL (Write Ahead Log) mode.
- /// </summary>
- public WalMode WalMode { get; set; }
-
- /// <summary>
- /// Gets or sets the size of the TLB (Thread-Local Buffer), in bytes.
- /// </summary>
- [DefaultValue(DefaultTlbSize)]
- public int TlbSize { get; set; }
-
- /// <summary>
- /// Gets or sets the WAL (Write Ahead Log) flush frequency.
- /// </summary>
- [DefaultValue(typeof(TimeSpan), "00:00:02")]
- public TimeSpan WalFlushFrequency { get; set; }
-
- /// <summary>
- /// Gets or sets the WAL (Write Ahead Log) fsync (disk sync) delay, in nanoseconds
- /// </summary>
- [DefaultValue(DefaultWalFsyncDelayNanos)]
- public long WalFsyncDelayNanos { get; set; }
-
- /// <summary>
- /// Gets or sets the size of the WAL (Write Ahead Log) record iterator buffer, in bytes.
- /// </summary>
- [DefaultValue(DefaultWalRecordIteratorBufferSize)]
- public int WalRecordIteratorBufferSize { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether full pages should always be written.
- /// </summary>
- public bool AlwaysWriteFullPages { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether to enable persistent store metrics.
- /// See <see cref="IIgnite.GetMemoryMetrics()"/>.
- /// </summary>
- public bool MetricsEnabled { get; set; }
-
- /// <summary>
- /// Gets or sets the length of the time interval for rate-based metrics.
- /// This interval defines a window over which hits will be tracked.
- /// </summary>
- [DefaultValue(typeof(TimeSpan), "00:01:00")]
- public TimeSpan RateTimeInterval { get; set; }
-
- /// <summary>
- /// Number of sub-intervals to split the <see cref="RateTimeInterval"/> into to track the update history.
- /// </summary>
- [DefaultValue(DefaultSubIntervals)]
- [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly",
- Justification = "Consistency with Java config")]
- public int SubIntervals { get; set; }
-
- /// <summary>
- /// Gets or sets the checkpoint page write order on disk.
- /// </summary>
- [DefaultValue(DefaultCheckpointWriteOrder)]
- public CheckpointWriteOrder CheckpointWriteOrder { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether threads that generate dirty
- /// pages too fast during ongoing checkpoint will be throttled.
- /// </summary>
- [DefaultValue(DefaultWriteThrottlingEnabled)]
- public bool WriteThrottlingEnabled { get; set; }
- }
-}
diff --git a/modules/yardstick/config/ignite-base-load-config.xml b/modules/yardstick/config/ignite-base-load-config.xml
index 3dc2218afc9..dcc04f6f540 100644
--- a/modules/yardstick/config/ignite-base-load-config.xml
+++ b/modules/yardstick/config/ignite-base-load-config.xml
@@ -39,11 +39,10 @@
</bean>
</property>
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="defaultMemoryPolicyName" value="default"/>
- <property name="memoryPolicies">
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="default"/>
<property name="size" value="#{8L * 1024 * 1024 * 1024}"/>
</bean>
diff --git a/modules/yardstick/config/ignite-db-base-config.xml b/modules/yardstick/config/ignite-db-base-config.xml
index 690edacd63b..b802843b815 100644
--- a/modules/yardstick/config/ignite-db-base-config.xml
+++ b/modules/yardstick/config/ignite-db-base-config.xml
@@ -29,9 +29,8 @@
<property name="metricsLogFrequency" value="5000"/>
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
- <property name="pageCacheSize" value="#{400L * 1024L * 1024L}"/>
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
</bean>
</property>
diff --git a/modules/yardstick/config/ignite-rdbms-config.xml b/modules/yardstick/config/ignite-rdbms-config.xml
index 26e8016dab2..67228d3ce63 100644
--- a/modules/yardstick/config/ignite-rdbms-config.xml
+++ b/modules/yardstick/config/ignite-rdbms-config.xml
@@ -28,19 +28,16 @@
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="clientMode" value="true"/>
- <property name="memoryConfiguration">
- <bean class="org.apache.ignite.configuration.MemoryConfiguration">
+ <property name="dataStorageConfiguration">
+ <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<!-- Set page memory size to 8 GB. -->
- <property name="defaultMemoryPolicyName" value="default"/>
- <property name="memoryPolicies">
- <list>
- <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
- <property name="name" value="default"/>
- <property name="initialSize" value="#{1L * 1024 * 1024 * 1024}"/>
- <property name="maxSize" value="#{8L * 1024 * 1024 * 1024}"/>
- </bean>
- </list>
+ <property name="defaultDataRegionConfiguration">
+ <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
+ <property name="name" value="default"/>
+ <property name="initialSize" value="#{1L * 1024 * 1024 * 1024}"/>
+ <property name="maxSize" value="#{8L * 1024 * 1024 * 1024}"/>
+ </bean>
</property>
</bean>
</property>