You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ji...@apache.org on 2019/08/29 04:24:01 UTC
[geode] branch develop updated: GEODE-6941: move xml configuration
objects to core (#3978)
This is an automated email from the ASF dual-hosted git repository.
jinmeiliao pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new b6e7b07 GEODE-6941: move xml configuration objects to core (#3978)
b6e7b07 is described below
commit b6e7b077f86b63ccbb52c6e383006531932cfef6
Author: Jinmei Liao <ji...@pivotal.io>
AuthorDate: Wed Aug 28 21:23:27 2019 -0700
GEODE-6941: move xml configuration objects to core (#3978)
* GEODE-6941: move xml configuration objects to core
Co-authored-by: Darrel Schneider <ds...@pivotal.io>
* CacheElement and other xml configuration should only exists in core
* use AbstractConfiguration in geode-management
* keep all xml domain objects in the same package as before and keep CacheElement an abstract class.
---
.../geode/test/junit/rules/HttpResponseAssert.java | 6 ++--
.../resources/ManagementClientCreateRegion.java | 2 +-
...ateRegionWithDiskstoreAndSecurityDUnitTest.java | 2 +-
.../rest/ClientClusterManagementSSLTest.java | 6 ++--
.../ClientClusterManagementServiceDunitTest.java | 8 ++---
...ClusterManagementLocatorReconnectDunitTest.java | 6 ++--
.../rest/ClusterManagementServiceOnServerTest.java | 2 +-
.../rest/ListIndexManagementDUnitTest.java | 2 +-
.../rest/ListRegionManagementDunitTest.java | 25 ++++++++-------
.../rest/ManagementRequestLoggingDUnitTest.java | 2 +-
.../rest/RebalanceManagementDunitTest.java | 2 +-
.../internal/rest/RegionManagementDunitTest.java | 6 ++--
.../internal/rest/ServerRestartTest.java | 2 +-
.../integrationTest/resources/assembly_content.txt | 5 +--
.../java/org/apache/geode/lang/Identifiable.java | 12 +++++++
.../jdbc/internal/cli/CreateDataSourceCommand.java | 5 +--
.../internal/cli/DestroyDataSourceCommand.java | 7 ++--
.../internal/CacheConfigDAODUnitTest.java | 2 +-
.../internal/api/RegionAPIDUnitTest.java | 6 ++--
.../cli/commands/AlterRegionCommandDUnitTest.java | 6 ++--
.../cli/commands/CreateRegionCommandDUnitTest.java | 16 +++++-----
...egionCommandPersistsConfigurationDUnitTest.java | 34 ++++++++++----------
.../RegionConfigMutatorIntegrationTest.java | 6 ++--
.../RegionConfigRealizerIntegrationTest.java | 2 +-
.../geode/cache/configuration/CacheConfig.java | 28 ++++++++--------
.../geode/cache/configuration/CacheElement.java | 23 +++-----------
.../configuration/CacheTransactionManagerType.java | 20 ++++++------
.../geode/cache/configuration/ClassNameType.java | 20 ++++++------
.../geode/cache/configuration/DeclarableType.java | 24 +++++++-------
.../geode/cache/configuration/DiskDirType.java | 20 ++++++------
.../geode/cache/configuration/DiskDirsType.java | 20 ++++++------
.../geode/cache/configuration/DiskStoreType.java | 21 ++++++------
.../configuration/DynamicRegionFactoryType.java | 20 ++++++------
.../configuration/EnumActionDestroyOverflow.java | 20 ++++++------
.../cache/configuration/EnumReadableWritable.java | 20 ++++++------
.../cache/configuration/FunctionServiceType.java | 20 ++++++------
.../cache/configuration/GatewayReceiverConfig.java | 0
.../cache/configuration/JndiBindingsType.java | 20 ++++++------
.../geode/cache/configuration/ObjectType.java | 20 ++++++------
.../geode/cache/configuration/ParameterType.java | 20 ++++++------
.../apache/geode/cache/configuration/PdxType.java | 20 ++++++------
.../apache/geode/cache/configuration/PoolType.java | 20 ++++++------
.../configuration/RegionAttributesDataPolicy.java | 20 ++++++------
.../RegionAttributesIndexUpdateType.java | 20 ++++++------
.../configuration/RegionAttributesMirrorType.java | 20 ++++++------
.../cache/configuration/RegionAttributesScope.java | 20 ++++++------
.../cache/configuration/RegionAttributesType.java | 32 ++++++++-----------
.../geode/cache/configuration/RegionConfig.java | 27 ++++++----------
.../cache/configuration/ResourceManagerType.java | 20 ++++++------
.../SerializationRegistrationType.java | 20 ++++++------
.../geode/cache/configuration/ServerType.java | 20 ++++++------
.../geode/cache/configuration/XSDRootElement.java | 29 ++++++-----------
.../geode/cache/configuration/package-info.java | 28 ++++------------
.../api/LocatorClusterManagementService.java | 17 +++++-----
.../cli/commands/AlterAsyncEventQueueCommand.java | 4 +--
.../internal/cli/commands/AlterRegionCommand.java | 7 ++--
.../cli/commands/CreateJndiBindingCommand.java | 4 +--
.../cli/commands/DestroyDiskStoreCommand.java | 4 +--
.../internal/cli/commands/DestroyIndexCommand.java | 6 ++--
.../cli/commands/DestroyJndiBindingCommand.java | 8 +++--
.../cli/commands/DestroyRegionCommand.java | 10 +++---
.../cli/functions/CacheRealizationFunction.java | 10 +++---
.../configuration/converters/RegionConverter.java | 2 +-
.../mutators/ConfigurationManager.java | 4 +--
.../mutators/RegionConfigManager.java | 4 +--
.../realizers/ConfigurationRealizer.java | 6 ++--
.../validators/CacheElementValidator.java | 12 +++----
.../validators/ConfigurationValidator.java | 4 +--
.../configuration/validators/MemberValidator.java | 20 ++++++------
.../validators/RegionConfigValidator.java | 8 ++---
.../sanctioned-geode-core-serializables.txt | 31 ++++++++++++++++++
.../sanctioned-geode-management-serializables.txt | 36 ++-------------------
.../geode/cache/configuration/CacheConfigTest.java | 1 +
.../cache/configuration/DeclarableTypeTest.java | 1 -
...nternalConfigurationPersistenceServiceTest.java | 2 +-
.../geode/internal/config/JAXBServiceTest.java | 2 +-
.../internal/api/ClusterManagementResultTest.java | 2 +-
.../api/LocatorClusterManagementServiceTest.java | 2 +-
.../converters/RegionConverterTest.java | 6 ++--
.../mutators/RegionConfigManagerTest.java | 2 +-
.../realizers/RegionConfigRealizerTest.java | 2 +-
.../validators/MemberValidatorTest.java | 2 +-
.../validators/RegionConfigValidatorTest.java | 2 +-
.../ClusterManagementListResultAssert.java | 6 ++--
.../ClusterManagementRealizationResultAssert.java | 2 +-
.../sanctioned-geode-lucene-serializables.txt | 2 +-
.../geode/cache/configuration/XSDRootElement.java | 32 -------------------
.../geode/cache/configuration/package-info.java | 25 ---------------
.../api/ClusterManagementListResult.java | 5 ++-
.../api/ClusterManagementRealizationException.java | 8 ++---
.../api/ClusterManagementRealizationResult.java | 9 ++----
.../management/api/ClusterManagementService.java | 17 ++++------
.../geode/management/api/ConfigurationResult.java | 4 +--
.../configuration/AbstractConfiguration.java} | 37 +++++++---------------
.../management/configuration/GatewayReceiver.java | 10 +++---
.../geode/management/configuration/Index.java | 6 ++--
.../management/configuration/MemberConfig.java | 3 +-
.../apache/geode/management/configuration/Pdx.java | 4 +--
.../geode/management/configuration/Region.java | 4 +--
.../configuration/RegionType.java | 2 +-
.../internal/ClientClusterManagementService.java | 18 +++++------
...entTest.java => AbstractConfigurationTest.java} | 5 +--
...Test.java => ConfigurationJsonMappingTest.java} | 4 +--
.../geode/management/configuration/RegionTest.java | 1 -
.../cli/commands/AlterRegionCommandDUnitTest.java | 18 +++++------
.../ClientClusterManagementServiceDUnitTest.java | 2 +-
...usterManagementSecurityRestIntegrationTest.java | 2 +-
.../rest/RegionManagementIntegrationTest.java | 2 +-
.../controllers/RegionManagementController.java | 2 +-
109 files changed, 539 insertions(+), 696 deletions(-)
diff --git a/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/test/junit/rules/HttpResponseAssert.java b/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/test/junit/rules/HttpResponseAssert.java
index bc32464..e048a9f 100644
--- a/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/test/junit/rules/HttpResponseAssert.java
+++ b/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/test/junit/rules/HttpResponseAssert.java
@@ -32,10 +32,10 @@ import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.AbstractCharSequenceAssert;
import org.assertj.core.api.ListAssert;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.api.ClusterManagementRealizationResult;
import org.apache.geode.management.api.ClusterManagementResult;
+import org.apache.geode.management.configuration.AbstractConfiguration;
public class HttpResponseAssert extends AbstractAssert<HttpResponseAssert, HttpResponse> {
private static final Logger logger = LogService.getLogger();
@@ -79,14 +79,14 @@ public class HttpResponseAssert extends AbstractAssert<HttpResponseAssert, HttpR
}
@SuppressWarnings("unchecked")
- public <R extends CacheElement> ClusterManagementResult getClusterManagementResult()
+ public <R extends AbstractConfiguration> ClusterManagementResult getClusterManagementResult()
throws Exception {
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(responseBody, ClusterManagementResult.class);
}
@SuppressWarnings("unchecked")
- public <R extends CacheElement> ClusterManagementRealizationResult getClusterManagementRealizationResult()
+ public <R extends AbstractConfiguration> ClusterManagementRealizationResult getClusterManagementRealizationResult()
throws Exception {
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(responseBody, ClusterManagementRealizationResult.class);
diff --git a/geode-assembly/src/acceptanceTest/resources/ManagementClientCreateRegion.java b/geode-assembly/src/acceptanceTest/resources/ManagementClientCreateRegion.java
index fe28980..2a6f58a 100644
--- a/geode-assembly/src/acceptanceTest/resources/ManagementClientCreateRegion.java
+++ b/geode-assembly/src/acceptanceTest/resources/ManagementClientCreateRegion.java
@@ -15,11 +15,11 @@
import javax.net.ssl.SSLContext;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.client.ClusterManagementServiceBuilder;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
public class ManagementClientCreateRegion {
public static void main(String[] args) throws Exception {
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/client/CreateRegionWithDiskstoreAndSecurityDUnitTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/client/CreateRegionWithDiskstoreAndSecurityDUnitTest.java
index 926983c..b6fcc16 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/client/CreateRegionWithDiskstoreAndSecurityDUnitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/client/CreateRegionWithDiskstoreAndSecurityDUnitTest.java
@@ -25,11 +25,11 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.examples.SimpleSecurityManager;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
import org.apache.geode.test.junit.rules.GfshCommandRule;
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClientClusterManagementSSLTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClientClusterManagementSSLTest.java
index 28bc3d7..7b5a254 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClientClusterManagementSSLTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClientClusterManagementSSLTest.java
@@ -20,6 +20,7 @@ import static org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE;
import static org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE_PASSWORD;
import static org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE;
import static org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE_PASSWORD;
+import static org.apache.geode.lang.Identifiable.find;
import static org.apache.geode.management.builder.ClusterManagementServiceBuilder.buildWithCache;
import static org.apache.geode.management.client.ClusterManagementServiceBuilder.buildWithHostAddress;
import static org.assertj.core.api.Assertions.assertThat;
@@ -38,8 +39,6 @@ import org.junit.Test;
import org.springframework.web.client.ResourceAccessException;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.examples.SimpleSecurityManager;
import org.apache.geode.internal.security.SecurableCommunicationChannel;
import org.apache.geode.management.api.ClusterManagementRealizationResult;
@@ -47,6 +46,7 @@ import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.api.RealizationResult;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
@@ -233,7 +233,7 @@ public class ClientClusterManagementSSLTest {
CacheConfig cacheConfig =
ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getCacheConfig("cluster");
- assertThat(CacheElement.findElement(cacheConfig.getRegions(), "orders")).isNotNull();
+ assertThat(find(cacheConfig.getRegions(), "orders")).isNotNull();
});
}
}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClientClusterManagementServiceDunitTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClientClusterManagementServiceDunitTest.java
index ce6c1a2..df3d32e 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClientClusterManagementServiceDunitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClientClusterManagementServiceDunitTest.java
@@ -1,5 +1,6 @@
package org.apache.geode.management.internal.rest;
+import static org.apache.geode.lang.Identifiable.find;
import static org.apache.geode.management.builder.ClusterManagementServiceBuilder.buildWithCache;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -9,8 +10,6 @@ import org.junit.ClassRule;
import org.junit.Test;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.api.ClusterManagementRealizationResult;
import org.apache.geode.management.api.ClusterManagementResult;
@@ -18,6 +17,7 @@ import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.api.RealizationResult;
import org.apache.geode.management.client.ClusterManagementServiceBuilder;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.rules.ClientVM;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
@@ -116,8 +116,8 @@ public class ClientClusterManagementServiceDunitTest {
ClusterStartupRule.getLocator().getConfigurationPersistenceService();
CacheConfig clusterCacheConfig = persistenceService.getCacheConfig("cluster", true);
CacheConfig groupACacheConfig = persistenceService.getCacheConfig("group-a");
- assertThat(CacheElement.findElement(clusterCacheConfig.getRegions(), "company")).isNull();
- assertThat(CacheElement.findElement(groupACacheConfig.getRegions(), "company")).isNotNull();
+ assertThat(find(clusterCacheConfig.getRegions(), "company")).isNull();
+ assertThat(find(groupACacheConfig.getRegions(), "company")).isNotNull();
});
}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClusterManagementLocatorReconnectDunitTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClusterManagementLocatorReconnectDunitTest.java
index f900982..3dc5ab1 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClusterManagementLocatorReconnectDunitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClusterManagementLocatorReconnectDunitTest.java
@@ -15,6 +15,7 @@
package org.apache.geode.management.internal.rest;
+import static org.apache.geode.lang.Identifiable.exists;
import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
import static org.assertj.core.api.Assertions.assertThat;
@@ -25,11 +26,10 @@ import org.junit.Rule;
import org.junit.Test;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementRealizationResult;
import org.apache.geode.management.api.RealizationResult;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.IgnoredException;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
@@ -94,7 +94,7 @@ public class ClusterManagementLocatorReconnectDunitTest {
CacheConfig cacheConfig =
ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getCacheConfig("cluster");
- assertThat(CacheElement.exists(cacheConfig.getRegions(), regionName)).isTrue();
+ assertThat(exists(cacheConfig.getRegions(), regionName)).isTrue();
});
}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClusterManagementServiceOnServerTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClusterManagementServiceOnServerTest.java
index 0571bd3..59094f6 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClusterManagementServiceOnServerTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ClusterManagementServiceOnServerTest.java
@@ -34,11 +34,11 @@ import org.junit.Rule;
import org.junit.Test;
import org.springframework.web.client.ResourceAccessException;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.internal.security.SecurableCommunicationChannel;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ListIndexManagementDUnitTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ListIndexManagementDUnitTest.java
index 7095357..044addd 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ListIndexManagementDUnitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ListIndexManagementDUnitTest.java
@@ -25,12 +25,12 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementListResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.client.ClusterManagementServiceBuilder;
import org.apache.geode.management.configuration.Index;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.runtime.RuntimeInfo;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ListRegionManagementDunitTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ListRegionManagementDunitTest.java
index 4a1bfbc..2bdfa8b 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ListRegionManagementDunitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ListRegionManagementDunitTest.java
@@ -15,6 +15,7 @@
package org.apache.geode.management.internal.rest;
+import static org.apache.geode.lang.Identifiable.find;
import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
import static org.assertj.core.api.Assertions.assertThat;
@@ -26,12 +27,12 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
-import org.apache.geode.cache.configuration.CacheElement;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementListResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.client.ClusterManagementServiceBuilder;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.runtime.RuntimeRegionInfo;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
@@ -112,17 +113,17 @@ public class ListRegionManagementDunitTest {
// list all
List<Region> regions = client.list(filter).getConfigResult();
assertThat(regions).hasSize(5);
- Region element = CacheElement.findElement(regions, "customers");
+ Region element = find(regions, "customers");
assertThat(element.getGroup()).isNull();
- element = CacheElement.findElement(regions, "customers1");
+ element = find(regions, "customers1");
assertThat(element.getGroup()).isEqualTo("group1");
- Region region = CacheElement.findElement(regions, "customers2");
+ Region region = find(regions, "customers2");
assertThat(region.getGroup()).isIn("group1", "group2");
assertThat(region.getType()).isIn(RegionType.PARTITION, RegionType.PARTITION_PROXY);
- element = CacheElement.findElement(regions, "customers3");
+ element = find(regions, "customers3");
assertThat(element.getGroups()).containsExactlyInAnyOrder("group1", "group2");
}
@@ -171,13 +172,13 @@ public class ListRegionManagementDunitTest {
List<Region> regions = client.list(filter).getConfigResult();
assertThat(regions).hasSize(3);
// when filtering by group, the returned list should not have group info
- Region region = CacheElement.findElement(regions, "customers1");
+ Region region = find(regions, "customers1");
assertThat(region.getGroup()).isEqualTo("group1");
- region = CacheElement.findElement(regions, "customers2");
+ region = find(regions, "customers2");
assertThat(region.getGroup()).isEqualTo("group1");
- region = CacheElement.findElement(regions, "customers3");
+ region = find(regions, "customers3");
assertThat(region.getGroups()).containsExactlyInAnyOrder("group1", "group2");
}
@@ -188,10 +189,10 @@ public class ListRegionManagementDunitTest {
List<Region> regions = client.list(filter).getConfigResult();
assertThat(regions).hasSize(2);
- Region region = CacheElement.findElement(regions, "customers2");
+ Region region = find(regions, "customers2");
assertThat(region.getGroup()).isEqualTo("group2");
- region = CacheElement.findElement(regions, "customers3");
+ region = find(regions, "customers3");
assertThat(region.getGroups()).containsExactlyInAnyOrder("group1", "group2");
}
@@ -227,7 +228,7 @@ public class ListRegionManagementDunitTest {
List<Region> regions = client.list(filter).getConfigResult();
assertThat(regions).hasSize(2);
assertThat(
- regions.stream().map(CacheElement::getGroup).collect(Collectors.toList()))
+ regions.stream().map(AbstractConfiguration::getGroup).collect(Collectors.toList()))
.containsExactlyInAnyOrder("group1", "group2");
assertThat(regions.stream().map(Region.class::cast)
.map(Region::getType)
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ManagementRequestLoggingDUnitTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ManagementRequestLoggingDUnitTest.java
index da009a6..ebf87d3 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ManagementRequestLoggingDUnitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ManagementRequestLoggingDUnitTest.java
@@ -29,11 +29,11 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.client.ClusterManagementServiceBuilder;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/RebalanceManagementDunitTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/RebalanceManagementDunitTest.java
index 522b2f4..1cec5be 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/RebalanceManagementDunitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/RebalanceManagementDunitTest.java
@@ -27,11 +27,11 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementOperationResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.client.ClusterManagementServiceBuilder;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.operation.RebalanceOperation;
import org.apache.geode.management.runtime.RebalanceRegionResult;
import org.apache.geode.management.runtime.RebalanceResult;
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/RegionManagementDunitTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/RegionManagementDunitTest.java
index 50090dd..a8bee3f 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/RegionManagementDunitTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/RegionManagementDunitTest.java
@@ -15,6 +15,7 @@
package org.apache.geode.management.internal.rest;
+import static org.apache.geode.lang.Identifiable.find;
import static org.apache.geode.test.junit.assertions.ClusterManagementRealizationResultAssert.assertManagementResult;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -27,15 +28,14 @@ import org.junit.Test;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementRealizationResult;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.api.RealizationResult;
import org.apache.geode.management.client.ClusterManagementServiceBuilder;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.IgnoredException;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
@@ -158,7 +158,7 @@ public class RegionManagementDunitTest {
CacheConfig cacheConfig =
ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getCacheConfig(group);
- RegionConfig regionConfig = CacheElement.findElement(cacheConfig.getRegions(), regionName);
+ RegionConfig regionConfig = find(cacheConfig.getRegions(), regionName);
assertThat(regionConfig.getType()).isEqualTo(type);
}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ServerRestartTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ServerRestartTest.java
index 4f006e6..3dc57ee 100644
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ServerRestartTest.java
+++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/ServerRestartTest.java
@@ -21,11 +21,11 @@ import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Rule;
import org.junit.Test;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.client.ClusterManagementServiceBuilder;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
diff --git a/geode-assembly/src/integrationTest/resources/assembly_content.txt b/geode-assembly/src/integrationTest/resources/assembly_content.txt
index bbfec6b..06731a4 100644
--- a/geode-assembly/src/integrationTest/resources/assembly_content.txt
+++ b/geode-assembly/src/integrationTest/resources/assembly_content.txt
@@ -336,7 +336,6 @@ javadoc/org/apache/geode/cache/configuration/RegionAttributesType.html
javadoc/org/apache/geode/cache/configuration/RegionConfig.Entry.html
javadoc/org/apache/geode/cache/configuration/RegionConfig.Index.html
javadoc/org/apache/geode/cache/configuration/RegionConfig.html
-javadoc/org/apache/geode/cache/configuration/RegionType.html
javadoc/org/apache/geode/cache/configuration/ResourceManagerType.html
javadoc/org/apache/geode/cache/configuration/SerializationRegistrationType.Instantiator.html
javadoc/org/apache/geode/cache/configuration/SerializationRegistrationType.Serializer.html
@@ -724,12 +723,14 @@ javadoc/org/apache/geode/management/client/ClusterManagementServiceBuilder.html
javadoc/org/apache/geode/management/client/package-frame.html
javadoc/org/apache/geode/management/client/package-summary.html
javadoc/org/apache/geode/management/client/package-tree.html
+javadoc/org/apache/geode/management/configuration/AbstractConfiguration.html
javadoc/org/apache/geode/management/configuration/ClassName.html
javadoc/org/apache/geode/management/configuration/GatewayReceiver.html
javadoc/org/apache/geode/management/configuration/Index.html
javadoc/org/apache/geode/management/configuration/MemberConfig.html
javadoc/org/apache/geode/management/configuration/Pdx.html
javadoc/org/apache/geode/management/configuration/Region.html
+javadoc/org/apache/geode/management/configuration/RegionType.html
javadoc/org/apache/geode/management/configuration/package-frame.html
javadoc/org/apache/geode/management/configuration/package-summary.html
javadoc/org/apache/geode/management/configuration/package-tree.html
@@ -939,7 +940,6 @@ lib/fastutil-8.2.2.jar
lib/findbugs-annotations-1.3.9-1.jar
lib/geo-0.7.1.jar
lib/geode-common-0.0.0.jar
-lib/geode-unsafe-0.0.0.jar
lib/geode-connectors-0.0.0.jar
lib/geode-core-0.0.0.jar
lib/geode-cq-0.0.0.jar
@@ -953,6 +953,7 @@ lib/geode-protobuf-0.0.0.jar
lib/geode-protobuf-messages-0.0.0.jar
lib/geode-rebalancer-0.0.0.jar
lib/geode-redis-0.0.0.jar
+lib/geode-unsafe-0.0.0.jar
lib/geode-wan-0.0.0.jar
lib/gfsh-dependencies.jar
lib/grumpy-core-0.2.2.jar
diff --git a/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java b/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java
index 0ca61d0..eeb77ee 100644
--- a/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java
+++ b/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java
@@ -16,6 +16,7 @@
package org.apache.geode.lang;
import java.io.Serializable;
+import java.util.List;
/**
* The Identifiable interface defines a contract for classes whose Object instances can be uniquely
@@ -36,4 +37,15 @@ public interface Identifiable<T extends Comparable<T>> extends Serializable {
*/
T getId();
+ static <T extends Identifiable> boolean exists(List<T> list, String id) {
+ return list.stream().anyMatch(o -> o.getId().equals(id));
+ }
+
+ static <T extends Identifiable> T find(List<T> list, String id) {
+ return list.stream().filter(o -> o.getId().equals(id)).findFirst().orElse(null);
+ }
+
+ static <T extends Identifiable> void remove(List<T> list, String id) {
+ list.removeIf(t -> t.getId().equals(id));
+ }
}
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateDataSourceCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateDataSourceCommand.java
index ba81b16..e5f0ae5 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateDataSourceCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateDataSourceCommand.java
@@ -14,6 +14,8 @@
*/
package org.apache.geode.connectors.jdbc.internal.cli;
+import static org.apache.geode.lang.Identifiable.exists;
+
import java.util.List;
import java.util.Set;
@@ -23,7 +25,6 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.annotations.Experimental;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.JndiBindingsType;
import org.apache.geode.cache.configuration.JndiBindingsType.JndiBinding.ConfigProperty;
import org.apache.geode.distributed.DistributedMember;
@@ -132,7 +133,7 @@ public class CreateDataSourceCommand extends SingleGfshCommand {
if (service != null) {
CacheConfig cacheConfig = service.getCacheConfig("cluster");
- if (cacheConfig != null && CacheElement.exists(cacheConfig.getJndiBindings(), name)) {
+ if (cacheConfig != null && exists(cacheConfig.getJndiBindings(), name)) {
String message =
CliStrings.format("Jndi binding with jndi-name \"{0}\" already exists.", name);
return ifNotExists ? ResultModel.createInfo("Skipping: " + message)
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyDataSourceCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyDataSourceCommand.java
index 2b1be87..dc97d03 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyDataSourceCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyDataSourceCommand.java
@@ -14,6 +14,9 @@
*/
package org.apache.geode.connectors.jdbc.internal.cli;
+import static org.apache.geode.lang.Identifiable.find;
+import static org.apache.geode.lang.Identifiable.remove;
+
import java.util.List;
import java.util.Set;
@@ -65,7 +68,7 @@ public class DestroyDataSourceCommand extends SingleGfshCommand {
if (service != null) {
List<JndiBindingsType.JndiBinding> bindings =
service.getCacheConfig("cluster").getJndiBindings();
- JndiBindingsType.JndiBinding binding = CacheElement.findElement(bindings, dataSourceName);
+ JndiBindingsType.JndiBinding binding = find(bindings, dataSourceName);
if (binding == null) {
throw new EntityNotFoundException(
CliStrings.format("Data source named \"{0}\" does not exist.", dataSourceName),
@@ -151,7 +154,7 @@ public class DestroyDataSourceCommand extends SingleGfshCommand {
@Override
public boolean updateConfigForGroup(String group, CacheConfig config, Object element) {
- CacheElement.removeElement(config.getJndiBindings(), (String) element);
+ remove(config.getJndiBindings(), (String) element);
return true;
}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/CacheConfigDAODUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/CacheConfigDAODUnitTest.java
index 287737e..78658d2 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/CacheConfigDAODUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/CacheConfigDAODUnitTest.java
@@ -23,8 +23,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.distributed.ConfigurationPersistenceService;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/api/RegionAPIDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/api/RegionAPIDUnitTest.java
index 9b41cb8..87f6ca0 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/api/RegionAPIDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/api/RegionAPIDUnitTest.java
@@ -14,6 +14,7 @@
*/
package org.apache.geode.management.internal.api;
+import static org.apache.geode.lang.Identifiable.find;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.BeforeClass;
@@ -25,11 +26,10 @@ import org.junit.rules.TestName;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
import org.apache.geode.test.junit.categories.RegionsTest;
@@ -122,7 +122,7 @@ public class RegionAPIDUnitTest {
CacheConfig cacheConfig =
ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getCacheConfig("cluster");
- RegionConfig regionConfig = CacheElement.findElement(cacheConfig.getRegions(), regionName);
+ RegionConfig regionConfig = find(cacheConfig.getRegions(), regionName);
assertThat(regionConfig.getType()).isEqualTo(type);
}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
index ef7a04a..5d6bd32 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
@@ -15,6 +15,7 @@
package org.apache.geode.management.internal.cli.commands;
+import static org.apache.geode.lang.Identifiable.find;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
@@ -40,7 +41,6 @@ import org.apache.geode.cache.ExpirationAttributes;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.RegionAttributes;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.EnumActionDestroyOverflow;
import org.apache.geode.cache.configuration.RegionAttributesType;
import org.apache.geode.cache.configuration.RegionConfig;
@@ -256,7 +256,7 @@ public class AlterRegionCommandDUnitTest {
locator.invoke(() -> {
CacheConfig config = ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getCacheConfig("cluster");
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), "regionA");
+ RegionConfig regionConfig = find(config.getRegions(), "regionA");
RegionAttributesType.EvictionAttributes evictionAttributes =
regionConfig.getRegionAttributes().getEvictionAttributes();
assertThat(evictionAttributes).isNull();
@@ -281,7 +281,7 @@ public class AlterRegionCommandDUnitTest {
locator.invoke(() -> {
CacheConfig config = ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getCacheConfig("cluster");
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), "regionA");
+ RegionConfig regionConfig = find(config.getRegions(), "regionA");
RegionAttributesType.EvictionAttributes evictionAttributes =
regionConfig.getRegionAttributes().getEvictionAttributes();
assertThat(evictionAttributes.getLruEntryCount().getMaximum()).isEqualTo("30");
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
index b9e332c..c60bacd 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
@@ -15,6 +15,7 @@
package org.apache.geode.management.internal.cli.commands;
+import static org.apache.geode.lang.Identifiable.find;
import static org.assertj.core.api.Assertions.assertThat;
import java.io.File;
@@ -42,7 +43,6 @@ import org.apache.geode.cache.RegionShortcut;
import org.apache.geode.cache.asyncqueue.AsyncEvent;
import org.apache.geode.cache.asyncqueue.AsyncEventListener;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionConfig;
import org.apache.geode.cache.util.CacheListenerAdapter;
import org.apache.geode.compression.Compressor;
@@ -221,14 +221,14 @@ public class CreateRegionCommandDUnitTest {
locator.invoke(() -> {
CacheConfig config = ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getCacheConfig("cluster");
- assertThat(CacheElement.findElement(config.getRegions(), regionName)).isNotNull();
+ assertThat(find(config.getRegions(), regionName)).isNotNull();
- RegionConfig parentConfig = CacheElement.findElement(config.getRegions(), regionName);
- assertThat(CacheElement.findElement(parentConfig.getRegions(), subRegionName)).isNotNull();
+ RegionConfig parentConfig = find(config.getRegions(), regionName);
+ assertThat(find(parentConfig.getRegions(), subRegionName)).isNotNull();
- RegionConfig subRegionConfig = CacheElement.findElement(parentConfig.getRegions(),
+ RegionConfig subRegionConfig = find(parentConfig.getRegions(),
subRegionName);
- assertThat(CacheElement.findElement(subRegionConfig.getRegions(), subSubRegionName))
+ assertThat(find(subRegionConfig.getRegions(), subSubRegionName))
.isNotNull();
});
}
@@ -800,9 +800,9 @@ public class CreateRegionCommandDUnitTest {
CacheConfig actual = persistenceService.getCacheConfig("cluster");
for (RegionShortcut shortcut : shortcuts) {
- assertThat(CacheElement.findElement(actual.getRegions(), shortcut.name()))
+ assertThat(find(actual.getRegions(), shortcut.name()))
.isEqualToComparingFieldByFieldRecursively(
- CacheElement.findElement(expected.getRegions(), shortcut.name()));
+ find(expected.getRegions(), shortcut.name()));
}
});
}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandPersistsConfigurationDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandPersistsConfigurationDUnitTest.java
index a5cbe02..42f0c38 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandPersistsConfigurationDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandPersistsConfigurationDUnitTest.java
@@ -14,6 +14,7 @@
*/
package org.apache.geode.management.internal.cli.commands;
+import static org.apache.geode.lang.Identifiable.find;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays;
@@ -35,7 +36,6 @@ import org.apache.geode.cache.LoaderHelper;
import org.apache.geode.cache.PartitionResolver;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionAttributesDataPolicy;
import org.apache.geode.cache.configuration.RegionAttributesScope;
import org.apache.geode.cache.configuration.RegionAttributesType;
@@ -214,7 +214,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
List<RegionConfig> regions = config.getRegions();
assertThat(regions).isNotEmpty();
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), regionName);
+ RegionConfig regionConfig = find(config.getRegions(), regionName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(regionName);
@@ -275,7 +275,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
List<String> regionNames = Arrays.asList(regionName, regionNameFromTemplate);
regionNames.forEach(name -> {
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), name);
+ RegionConfig regionConfig = find(config.getRegions(), name);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(name);
assertThat(regionConfig.getRegionAttributes()).isNotNull();
@@ -385,7 +385,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
List<String> regionNames = Arrays.asList(regionName);
regionNames.forEach(name -> {
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), name);
+ RegionConfig regionConfig = find(config.getRegions(), name);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(name);
assertThat(regionConfig.getRegionAttributes()).isNotNull();
@@ -421,7 +421,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
List<RegionConfig> regions = config.getRegions();
assertThat(regions).isNotEmpty();
assertThat(regions).hasSize(1);
- RegionConfig regionConfig = CacheElement.findElement(regions, regionName);
+ RegionConfig regionConfig = find(regions, regionName);
assertThat(regionConfig.getRegionAttributes().getAsyncEventQueueIds())
.contains(queueId);
});
@@ -454,12 +454,12 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
assertThat(regions).isNotEmpty();
assertThat(regions).hasSize(3);
- RegionConfig colocatedConfig = CacheElement.findElement(regions, colocatedRegionName);
+ RegionConfig colocatedConfig = find(regions, colocatedRegionName);
assertThat(
colocatedConfig.getRegionAttributes().getPartitionAttributes().getColocatedWith())
.isEqualTo("/" + regionName);
- RegionConfig colocatedConfigFromTemplate = CacheElement.findElement(regions,
+ RegionConfig colocatedConfigFromTemplate = find(regions,
colocatedRegionFromTemplateName);
assertThat(
colocatedConfigFromTemplate.getRegionAttributes().getPartitionAttributes()
@@ -501,7 +501,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
List<String> regionNames = Arrays.asList(regionName, regionNameFromTemplate);
regionNames.forEach(name -> {
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), name);
+ RegionConfig regionConfig = find(config.getRegions(), name);
assertThat(regionConfig.getName()).isEqualTo(name);
RegionAttributesType regionAttributes = regionConfig.getRegionAttributes();
@@ -542,7 +542,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
List<String> regionNames = Arrays.asList(regionName, regionFromTemplateName);
regionNames.forEach(name -> {
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), name);
+ RegionConfig regionConfig = find(config.getRegions(), name);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(name);
@@ -590,7 +590,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
assertThat(regions).isNotEmpty();
assertThat(regions).hasSize(1);
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), regionName);
+ RegionConfig regionConfig = find(config.getRegions(), regionName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(regionName);
@@ -626,7 +626,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
assertThat(regions).hasSize(2);
RegionConfig regionConfig =
- CacheElement.findElement(config.getRegions(), regionFromTemplateName);
+ find(config.getRegions(), regionFromTemplateName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(regionFromTemplateName);
assertThat(regionConfig.getRegionAttributes()).isNotNull();
@@ -655,7 +655,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
assertThat(regions).hasSize(1);
RegionConfig regionConfig =
- CacheElement.findElement(config.getRegions(), regionName);
+ find(config.getRegions(), regionName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(regionName);
assertThat(regionConfig.getRegionAttributes()).isNotNull();
@@ -701,7 +701,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
List<String> regionNames = Arrays.asList(regionName, regionFromTemplateName);
regionNames.forEach(name -> {
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), name);
+ RegionConfig regionConfig = find(config.getRegions(), name);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(name);
assertThat(regionConfig.getRegionAttributes()).isNotNull();
@@ -733,7 +733,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
assertThat(regions).isNotEmpty();
assertThat(regions).hasSize(1);
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), regionName);
+ RegionConfig regionConfig = find(config.getRegions(), regionName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(regionName);
assertThat(regionConfig.getRegionAttributes()).isNotNull();
@@ -761,7 +761,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
assertThat(regions).isNotEmpty();
assertThat(regions).hasSize(1);
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), regionName);
+ RegionConfig regionConfig = find(config.getRegions(), regionName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getName()).isEqualTo(regionName);
assertThat(regionConfig.getRegionAttributes()).isNotNull();
@@ -795,7 +795,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
assertThat(regions).isNotEmpty();
assertThat(regions).hasSize(2);
- RegionConfig regionConfig1 = CacheElement.findElement(config.getRegions(), regionName);
+ RegionConfig regionConfig1 = find(config.getRegions(), regionName);
assertThat(regionConfig1).isNotNull();
assertThat(regionConfig1.getName()).isEqualTo(regionName);
assertThat(regionConfig1.getRegionAttributes()).isNotNull();
@@ -805,7 +805,7 @@ public class CreateRegionCommandPersistsConfigurationDUnitTest {
.describedAs("Scope for partitioned region should be null")
.isNull();
- RegionConfig regionConfig2 = CacheElement.findElement(config.getRegions(), regionName2);
+ RegionConfig regionConfig2 = find(config.getRegions(), regionName2);
assertThat(regionConfig2).isNotNull();
assertThat(regionConfig2.getName()).isEqualTo(regionName2);
assertThat(regionConfig2.getRegionAttributes()).isNotNull();
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigMutatorIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigMutatorIntegrationTest.java
index fb73822..ff44cb5 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigMutatorIntegrationTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigMutatorIntegrationTest.java
@@ -14,6 +14,7 @@
*/
package org.apache.geode.management.internal.configuration.mutators;
+import static org.apache.geode.lang.Identifiable.find;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Before;
@@ -21,9 +22,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.junit.rules.LocatorStarterRule;
public class RegionConfigMutatorIntegrationTest {
@@ -48,6 +48,6 @@ public class RegionConfigMutatorIntegrationTest {
locator.getLocator().getConfigurationPersistenceService().getCacheConfig("cluster", true);
mutator.add(config, cacheConfig);
- assertThat(CacheElement.findElement(cacheConfig.getRegions(), config.getId())).isNotNull();
+ assertThat(find(cacheConfig.getRegions(), config.getId())).isNotNull();
}
}
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/management/internal/configuration/realizers/RegionConfigRealizerIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/management/internal/configuration/realizers/RegionConfigRealizerIntegrationTest.java
index 080095c..c6309df 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/management/internal/configuration/realizers/RegionConfigRealizerIntegrationTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/management/internal/configuration/realizers/RegionConfigRealizerIntegrationTest.java
@@ -24,8 +24,8 @@ import org.junit.Test;
import org.apache.geode.cache.DataPolicy;
import org.apache.geode.cache.RegionExistsException;
import org.apache.geode.cache.Scope;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.test.junit.rules.ServerStarterRule;
public class RegionConfigRealizerIntegrationTest {
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java
similarity index 99%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java
index 337b80b..4f43799 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java
@@ -1,24 +1,22 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
-import static org.apache.geode.cache.configuration.CacheElement.findElement;
+import static org.apache.geode.lang.Identifiable.find;
import java.math.BigInteger;
import java.util.ArrayList;
@@ -1030,7 +1028,7 @@ public class CacheConfig {
if (regionPath.startsWith(SEPARATOR)) {
regionPath = regionPath.substring(1);
}
- return findElement(getRegions(), regionPath);
+ return find(getRegions(), regionPath);
}
public <T extends CacheElement> List<T> findCustomCacheElements(Class<T> classT) {
@@ -1045,7 +1043,7 @@ public class CacheConfig {
}
public <T extends CacheElement> T findCustomCacheElement(String elementId, Class<T> classT) {
- return findElement(findCustomCacheElements(classT), elementId);
+ return find(findCustomCacheElements(classT), elementId);
}
public <T extends CacheElement> List<T> findCustomRegionElements(String regionPath,
@@ -1067,7 +1065,7 @@ public class CacheConfig {
public <T extends CacheElement> T findCustomRegionElement(String regionPath, String elementId,
Class<T> classT) {
- return findElement(findCustomRegionElements(regionPath, classT), elementId);
+ return find(findCustomRegionElements(regionPath, classT), elementId);
}
/**
diff --git a/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/CacheElement.java
similarity index 58%
copy from geode-common/src/main/java/org/apache/geode/lang/Identifiable.java
copy to geode-core/src/main/java/org/apache/geode/cache/configuration/CacheElement.java
index 0ca61d0..4f82fcf 100644
--- a/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/CacheElement.java
@@ -13,27 +13,14 @@
* the License.
*/
-package org.apache.geode.lang;
+package org.apache.geode.cache.configuration;
import java.io.Serializable;
-/**
- * The Identifiable interface defines a contract for classes whose Object instances can be uniquely
- * identified relative to other Object instances within the same class type hierarchy.
- * <p/>
- *
- * @param <T> the class type of the identifier.
- * @see java.lang.Comparable
- * @since GemFire 7.0
- */
-public interface Identifiable<T extends Comparable<T>> extends Serializable {
+import org.apache.geode.annotations.Experimental;
+import org.apache.geode.lang.Identifiable;
- /**
- * Gets the identifier uniquely identifying this Object instance.
- * <p/>
- *
- * @return an identifier uniquely identifying this Object.
- */
- T getId();
+@Experimental
+public abstract class CacheElement implements Identifiable<String>, Serializable {
}
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheTransactionManagerType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/CacheTransactionManagerType.java
similarity index 87%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/CacheTransactionManagerType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/CacheTransactionManagerType.java
index e1c0c43..9100786 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheTransactionManagerType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/CacheTransactionManagerType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/ClassNameType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/ClassNameType.java
similarity index 78%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/ClassNameType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/ClassNameType.java
index 9cb3ea3..b80a167 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/ClassNameType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/ClassNameType.java
@@ -1,18 +1,16 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/DeclarableType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/DeclarableType.java
similarity index 84%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/DeclarableType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/DeclarableType.java
index acebcab..3670c5b 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/DeclarableType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/DeclarableType.java
@@ -1,18 +1,16 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
@@ -32,6 +30,7 @@ import javax.xml.bind.annotation.XmlType;
import org.apache.commons.lang3.StringUtils;
import org.apache.geode.annotations.Experimental;
+import org.apache.geode.annotations.internal.MakeImmutable;
import org.apache.geode.management.configuration.ClassName;
/**
@@ -67,7 +66,8 @@ public class DeclarableType extends ClassNameType implements Serializable {
// used to remove a Declarable through gfsh command
// e.g. alter region --name=regionA --cache-loader=''
- public static DeclarableType EMPTY = new DeclarableType("");
+ @MakeImmutable
+ public static final DeclarableType EMPTY = new DeclarableType("");
public DeclarableType() {}
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskDirType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/DiskDirType.java
similarity index 77%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/DiskDirType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/DiskDirType.java
index 7239839..4b08e15 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskDirType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/DiskDirType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskDirsType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/DiskDirsType.java
similarity index 79%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/DiskDirsType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/DiskDirsType.java
index b5c6989..209b101 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskDirsType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/DiskDirsType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java
similarity index 92%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java
index ae8d959..255014f 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
@@ -30,7 +28,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.geode.annotations.Experimental;
-
/**
*
* A "disk-store" element specifies a DiskStore for persistence.
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/DynamicRegionFactoryType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/DynamicRegionFactoryType.java
similarity index 87%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/DynamicRegionFactoryType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/DynamicRegionFactoryType.java
index b1a4e64..246aecb 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/DynamicRegionFactoryType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/DynamicRegionFactoryType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/EnumActionDestroyOverflow.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/EnumActionDestroyOverflow.java
similarity index 72%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/EnumActionDestroyOverflow.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/EnumActionDestroyOverflow.java
index 4d2cc1f..2ff3fba 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/EnumActionDestroyOverflow.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/EnumActionDestroyOverflow.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/EnumReadableWritable.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/EnumReadableWritable.java
similarity index 70%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/EnumReadableWritable.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/EnumReadableWritable.java
index 52d8ade..02977cd 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/EnumReadableWritable.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/EnumReadableWritable.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/FunctionServiceType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/FunctionServiceType.java
similarity index 82%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/FunctionServiceType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/FunctionServiceType.java
index 9477b83..d01ad4c 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/FunctionServiceType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/FunctionServiceType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/GatewayReceiverConfig.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/GatewayReceiverConfig.java
similarity index 100%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/GatewayReceiverConfig.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/GatewayReceiverConfig.java
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java
similarity index 97%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java
index 04aa221..c624d7b 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/ObjectType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/ObjectType.java
similarity index 82%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/ObjectType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/ObjectType.java
index 324a004..8633b62 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/ObjectType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/ObjectType.java
@@ -1,18 +1,16 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/ParameterType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/ParameterType.java
similarity index 82%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/ParameterType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/ParameterType.java
index a8921d0..15c55ca 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/ParameterType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/ParameterType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/PdxType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/PdxType.java
similarity index 88%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/PdxType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/PdxType.java
index 2e255c9..03b29a2 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/PdxType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/PdxType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/PoolType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/PoolType.java
similarity index 97%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/PoolType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/PoolType.java
index b17aae8..aeb8a47 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/PoolType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/PoolType.java
@@ -1,18 +1,16 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesDataPolicy.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesDataPolicy.java
similarity index 77%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesDataPolicy.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesDataPolicy.java
index a3f0b59..8c0e66a 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesDataPolicy.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesDataPolicy.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesIndexUpdateType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesIndexUpdateType.java
similarity index 73%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesIndexUpdateType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesIndexUpdateType.java
index 1081714..a3cf587 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesIndexUpdateType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesIndexUpdateType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesMirrorType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesMirrorType.java
similarity index 72%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesMirrorType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesMirrorType.java
index 0dec711..bfd6835 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesMirrorType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesMirrorType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesScope.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesScope.java
similarity index 73%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesScope.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesScope.java
index b140101..0fe14bc 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesScope.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesScope.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesType.java
similarity index 99%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesType.java
index 0f13705..c1b8b21 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionAttributesType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionAttributesType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
@@ -21,6 +19,7 @@ package org.apache.geode.cache.configuration;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Properties;
@@ -34,10 +33,10 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;
import org.apache.geode.annotations.Experimental;
+import org.apache.geode.annotations.Immutable;
import org.apache.geode.management.configuration.ClassName;
@@ -1498,7 +1497,6 @@ public class RegionAttributesType implements Serializable {
this.offHeap = value;
}
- @ApiModelProperty(hidden = true)
public void setLruHeapPercentageEvictionAction(EnumActionDestroyOverflow action) {
if (evictionAttributes == null) {
evictionAttributes = new EvictionAttributes();
@@ -1509,7 +1507,6 @@ public class RegionAttributesType implements Serializable {
evictionAttributes.setLruHeapPercentage(lruHeapPercentage);
}
- @ApiModelProperty(hidden = true)
public void setInterestPolicy(String interestPolicy) {
if (subscriptionAttributes == null) {
subscriptionAttributes = new SubscriptionAttributes();
@@ -1517,7 +1514,6 @@ public class RegionAttributesType implements Serializable {
subscriptionAttributes.setInterestPolicy(interestPolicy);
}
- @ApiModelProperty(hidden = true)
public void setRedundantCopy(String copies) {
if (partitionAttributes == null) {
partitionAttributes = new PartitionAttributes();
@@ -1525,7 +1521,6 @@ public class RegionAttributesType implements Serializable {
partitionAttributes.setRedundantCopies(copies);
}
- @ApiModelProperty(hidden = true)
public void setLocalMaxMemory(String maxMemory) {
if (partitionAttributes == null) {
partitionAttributes = new PartitionAttributes();
@@ -1921,8 +1916,9 @@ public class RegionAttributesType implements Serializable {
@XmlAttribute(name = "timeout", required = true)
protected String timeout;
- private static List<String> ALLOWED_ACTIONS =
- Arrays.asList("invalidate", "destroy", "local-invalidate", "local-destroy");
+ @Immutable
+ private static final List<String> ALLOWED_ACTIONS = Collections.unmodifiableList(
+ Arrays.asList("invalidate", "destroy", "local-invalidate", "local-destroy"));
/**
* Gets the value of the customExpiry property.
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java
similarity index 96%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java
index 5382b97..0734510 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
@@ -30,10 +28,10 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import io.swagger.annotations.ApiModelProperty;
import org.apache.geode.annotations.Experimental;
import org.apache.geode.lang.Identifiable;
+import org.apache.geode.management.configuration.RegionType;
/**
@@ -155,21 +153,17 @@ import org.apache.geode.lang.Identifiable;
@Experimental
public class RegionConfig implements Identifiable<String>, Serializable {
- public static final String REGION_CONFIG_ENDPOINT = "/regions";
-
@XmlElement(name = "region-attributes", namespace = "http://geode.apache.org/schema/cache")
protected RegionAttributesType regionAttributes;
@XmlElement(name = "index", namespace = "http://geode.apache.org/schema/cache")
protected List<Index> indexes;
- @ApiModelProperty(hidden = true)
@XmlElement(name = "entry", namespace = "http://geode.apache.org/schema/cache")
protected List<Entry> entries;
@XmlAnyElement(lax = true)
protected List<CacheElement> regionElements;
- @ApiModelProperty(hidden = true)
@XmlElement(name = "region", namespace = "http://geode.apache.org/schema/cache")
protected List<RegionConfig> regions;
@@ -241,7 +235,6 @@ public class RegionConfig implements Identifiable<String>, Serializable {
* Currently, users can not create regions with custom region elements using management v2 api.
* this cache element list will be ignored when creating the region
*/
- @ApiModelProperty(hidden = true)
public List<CacheElement> getCustomRegionElements() {
if (regionElements == null) {
regionElements = new ArrayList<>();
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/ResourceManagerType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/ResourceManagerType.java
similarity index 86%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/ResourceManagerType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/ResourceManagerType.java
index 345826b..f87cb78 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/ResourceManagerType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/ResourceManagerType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/SerializationRegistrationType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/SerializationRegistrationType.java
similarity index 92%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/SerializationRegistrationType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/SerializationRegistrationType.java
index 4155d17..dc49ace 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/SerializationRegistrationType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/SerializationRegistrationType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/ServerType.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/ServerType.java
similarity index 96%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/ServerType.java
rename to geode-core/src/main/java/org/apache/geode/cache/configuration/ServerType.java
index 2727ac2..08d9d9a 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/ServerType.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/ServerType.java
@@ -1,19 +1,17 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
diff --git a/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/XSDRootElement.java
similarity index 56%
copy from geode-common/src/main/java/org/apache/geode/lang/Identifiable.java
copy to geode-core/src/main/java/org/apache/geode/cache/configuration/XSDRootElement.java
index 0ca61d0..38587f1 100644
--- a/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/XSDRootElement.java
@@ -13,27 +13,18 @@
* the License.
*/
-package org.apache.geode.lang;
+package org.apache.geode.cache.configuration;
-import java.io.Serializable;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
-/**
- * The Identifiable interface defines a contract for classes whose Object instances can be uniquely
- * identified relative to other Object instances within the same class type hierarchy.
- * <p/>
- *
- * @param <T> the class type of the identifier.
- * @see java.lang.Comparable
- * @since GemFire 7.0
- */
-public interface Identifiable<T extends Comparable<T>> extends Serializable {
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
- /**
- * Gets the identifier uniquely identifying this Object instance.
- * <p/>
- *
- * @return an identifier uniquely identifying this Object.
- */
- T getId();
+@Retention(RUNTIME)
+@Target({TYPE})
+public @interface XSDRootElement {
+ String namespace() default "";
+ String schemaLocation() default "";
}
diff --git a/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java b/geode-core/src/main/java/org/apache/geode/cache/configuration/package-info.java
similarity index 56%
copy from geode-common/src/main/java/org/apache/geode/lang/Identifiable.java
copy to geode-core/src/main/java/org/apache/geode/cache/configuration/package-info.java
index 0ca61d0..d45c03e 100644
--- a/geode-common/src/main/java/org/apache/geode/lang/Identifiable.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/configuration/package-info.java
@@ -13,27 +13,11 @@
* the License.
*/
-package org.apache.geode.lang;
+@XmlSchema(namespace = "http://geode.apache.org/schema/cache",
+ xmlns = {@XmlNs(prefix = "", namespaceURI = "http://geode.apache.org/schema/cache")},
+ elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-import java.io.Serializable;
+package org.apache.geode.cache.configuration;
-/**
- * The Identifiable interface defines a contract for classes whose Object instances can be uniquely
- * identified relative to other Object instances within the same class type hierarchy.
- * <p/>
- *
- * @param <T> the class type of the identifier.
- * @see java.lang.Comparable
- * @since GemFire 7.0
- */
-public interface Identifiable<T extends Comparable<T>> extends Serializable {
-
- /**
- * Gets the identifier uniquely identifying this Object instance.
- * <p/>
- *
- * @return an identifier uniquely identifying this Object.
- */
- T getId();
-
-}
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlSchema;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java b/geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java
index 9cb7ed3..5de0ba6 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java
@@ -35,7 +35,6 @@ import org.apache.logging.log4j.Logger;
import org.apache.geode.annotations.VisibleForTesting;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.execute.Execution;
import org.apache.geode.cache.execute.Function;
import org.apache.geode.cache.execute.FunctionService;
@@ -59,6 +58,7 @@ import org.apache.geode.management.api.ConfigurationResult;
import org.apache.geode.management.api.CorrespondWith;
import org.apache.geode.management.api.RealizationResult;
import org.apache.geode.management.api.RestfulEndpoint;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.configuration.GatewayReceiver;
import org.apache.geode.management.configuration.Index;
import org.apache.geode.management.configuration.MemberConfig;
@@ -126,7 +126,7 @@ public class LocatorClusterManagementService implements ClusterManagementService
}
@Override
- public <T extends CacheElement> ClusterManagementRealizationResult create(T config) {
+ public <T extends AbstractConfiguration> ClusterManagementRealizationResult create(T config) {
// validate that user used the correct config object type
ConfigurationManager configurationManager = getConfigurationManager(config);
@@ -194,7 +194,7 @@ public class LocatorClusterManagementService implements ClusterManagementService
}
@Override
- public <T extends CacheElement> ClusterManagementRealizationResult delete(
+ public <T extends AbstractConfiguration> ClusterManagementRealizationResult delete(
T config) {
// validate that user used the correct config object type
ConfigurationManager configurationManager = getConfigurationManager(config);
@@ -267,13 +267,13 @@ public class LocatorClusterManagementService implements ClusterManagementService
}
@Override
- public <T extends CacheElement> ClusterManagementRealizationResult update(
+ public <T extends AbstractConfiguration> ClusterManagementRealizationResult update(
T config) {
throw new NotImplementedException("Not implemented");
}
@Override
- public <T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> list(
+ public <T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> list(
T filter) {
ClusterManagementListResult<T, R> result = new ClusterManagementListResult<>();
@@ -335,7 +335,8 @@ public class LocatorClusterManagementService implements ClusterManagementService
// if "cluster" is the only group, clear it, so that the returning json does not show
// "cluster" as a group value
- if (element.getGroups().size() == 1 && CacheElement.CLUSTER.equals(element.getGroup())) {
+ if (element.getGroups().size() == 1
+ && AbstractConfiguration.CLUSTER.equals(element.getGroup())) {
element.getGroups().clear();
}
@@ -376,7 +377,7 @@ public class LocatorClusterManagementService implements ClusterManagementService
}
@Override
- public <T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> get(
+ public <T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> get(
T config) {
ClusterManagementListResult<T, R> list = list(config);
List<ConfigurationResult<T, R>> result = list.getResult();
@@ -516,7 +517,7 @@ public class LocatorClusterManagementService implements ClusterManagementService
operationManager.close();
}
- private <T extends CacheElement> ConfigurationManager<T> getConfigurationManager(
+ private <T extends AbstractConfiguration> ConfigurationManager<T> getConfigurationManager(
T config) {
ConfigurationManager configurationManager = managers.get(config.getClass());
if (configurationManager == null) {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommand.java
index ebc53de..2f33da1 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommand.java
@@ -34,8 +34,8 @@ import org.springframework.shell.core.annotation.CliOption;
import org.xml.sax.SAXException;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
+import org.apache.geode.lang.Identifiable;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.SingleGfshCommand;
import org.apache.geode.management.cli.UpdateAllConfigurationGroupsMarker;
@@ -127,7 +127,7 @@ public class AlterAsyncEventQueueCommand extends SingleGfshCommand implements
Set<String> groups = ccService.getGroups();
for (String group : groups) {
queue =
- CacheElement.findElement(ccService.getCacheConfig(group).getAsyncEventQueues(), aeqId);
+ Identifiable.find(ccService.getCacheConfig(group).getAsyncEventQueues(), aeqId);
if (queue != null) {
return queue;
}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommand.java
index ff93f32..ce59fd4 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommand.java
@@ -14,6 +14,8 @@
*/
package org.apache.geode.management.internal.cli.commands;
+import static org.apache.geode.lang.Identifiable.find;
+
import java.util.Arrays;
import java.util.List;
import java.util.Set;
@@ -25,7 +27,6 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.ExpirationAction;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.DeclarableType;
import org.apache.geode.cache.configuration.RegionAttributesType;
import org.apache.geode.cache.configuration.RegionAttributesType.EvictionAttributes;
@@ -119,7 +120,7 @@ public class AlterRegionCommand extends SingleGfshCommand {
// we always know that regionPath starts with a "/", so we need to strip it out before we
// pass it in to look for the regionConfig
regionConfig =
- CacheElement.findElement(clusterConfig.getRegions(), regionPath.substring(1));
+ find(clusterConfig.getRegions(), regionPath.substring(1));
}
if (regionConfig == null) {
@@ -204,7 +205,7 @@ public class AlterRegionCommand extends SingleGfshCommand {
@Override
public boolean updateConfigForGroup(String group, CacheConfig cacheConfig, Object configObject) {
RegionConfig deltaConfig = (RegionConfig) configObject;
- RegionConfig existingConfig = CacheElement.findElement(cacheConfig.getRegions(),
+ RegionConfig existingConfig = find(cacheConfig.getRegions(),
deltaConfig.getId());
RegionAttributesType deltaAttributes = deltaConfig.getRegionAttributes();
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommand.java
index bf3d989..7794e49 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommand.java
@@ -24,11 +24,11 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.JndiBindingsType;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.lang.Identifiable;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.SingleGfshCommand;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
@@ -153,7 +153,7 @@ public class CreateJndiBindingCommand extends SingleGfshCommand {
if (service != null) {
CacheConfig cacheConfig = service.getCacheConfig("cluster");
- if (cacheConfig != null && CacheElement.exists(cacheConfig.getJndiBindings(), jndiName)) {
+ if (cacheConfig != null && Identifiable.exists(cacheConfig.getJndiBindings(), jndiName)) {
String message =
CliStrings.format("Jndi binding with jndi-name \"{0}\" already exists.", jndiName);
return ifNotExists ? ResultModel.createInfo("Skipping: " + message)
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyDiskStoreCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyDiskStoreCommand.java
index f93077b..166946a 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyDiskStoreCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyDiskStoreCommand.java
@@ -22,8 +22,8 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.lang.Identifiable;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.SingleGfshCommand;
@@ -69,7 +69,7 @@ public class DestroyDiskStoreCommand extends SingleGfshCommand {
@Override
public boolean updateConfigForGroup(String group, CacheConfig config, Object configObject) {
String diskStoreName = (String) configObject;
- CacheElement.removeElement(config.getDiskStores(), diskStoreName);
+ Identifiable.remove(config.getDiskStores(), diskStoreName);
return true;
}
}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyIndexCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyIndexCommand.java
index 865a7c6..b581831 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyIndexCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyIndexCommand.java
@@ -24,11 +24,11 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.annotations.Immutable;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionConfig;
import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.internal.lang.StringUtils;
+import org.apache.geode.lang.Identifiable;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.SingleGfshCommand;
@@ -111,12 +111,12 @@ public class DestroyIndexCommand extends SingleGfshCommand {
if (indexName.isEmpty()) {
regionConfig.getIndexes().clear();
} else {
- CacheElement.removeElement(regionConfig.getIndexes(), indexName);
+ Identifiable.remove(regionConfig.getIndexes(), indexName);
}
} else {
// Need to search for the index name as region was not specified
for (RegionConfig r : config.getRegions()) {
- CacheElement.removeElement(r.getIndexes(), indexName);
+ Identifiable.remove(r.getIndexes(), indexName);
}
}
return true;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommand.java
index dc1871a..0879a15 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommand.java
@@ -15,6 +15,9 @@
package org.apache.geode.management.internal.cli.commands;
+import static org.apache.geode.lang.Identifiable.find;
+import static org.apache.geode.lang.Identifiable.remove;
+
import java.util.List;
import java.util.Set;
@@ -22,7 +25,6 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.JndiBindingsType;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
@@ -61,7 +63,7 @@ public class DestroyJndiBindingCommand extends SingleGfshCommand {
if (service != null) {
List<JndiBindingsType.JndiBinding> bindings =
service.getCacheConfig("cluster").getJndiBindings();
- JndiBindingsType.JndiBinding binding = CacheElement.findElement(bindings, jndiName);
+ JndiBindingsType.JndiBinding binding = find(bindings, jndiName);
// fail fast when CC is running and if required binding not found assuming that
// when CC is running then every configuration goes through CC
if (binding == null) {
@@ -86,7 +88,7 @@ public class DestroyJndiBindingCommand extends SingleGfshCommand {
@Override
public boolean updateConfigForGroup(String group, CacheConfig config, Object element) {
- CacheElement.removeElement(config.getJndiBindings(), (String) element);
+ remove(config.getJndiBindings(), (String) element);
return true;
}
}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommand.java
index 0d233bd..52c3417 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommand.java
@@ -14,6 +14,8 @@
*/
package org.apache.geode.management.internal.cli.commands;
+import static org.apache.geode.lang.Identifiable.find;
+
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
@@ -23,10 +25,10 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionConfig;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
+import org.apache.geode.lang.Identifiable;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.GfshCommand;
@@ -113,10 +115,10 @@ public class DestroyRegionCommand extends GfshCommand {
for (String groupName : groupNames) {
CacheConfig cacheConfig = ccService.getCacheConfig(groupName);
if (cacheConfig != null) {
- RegionConfig regionConfig = CacheElement.findElement(cacheConfig.getRegions(), regionName);
+ RegionConfig regionConfig = find(cacheConfig.getRegions(), regionName);
if (regionConfig != null) {
- CacheElement element =
- CacheElement.findElement(regionConfig.getCustomRegionElements(), "jdbc-mapping");
+ Identifiable element =
+ find(regionConfig.getCustomRegionElements(), "jdbc-mapping");
if (element != null) {
throw new IllegalStateException("Cannot destroy region \"" + regionName
+ "\" because JDBC mapping exists. Use \"destroy jdbc-mapping\" first.");
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CacheRealizationFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CacheRealizationFunction.java
index c41d2dd..35cb8fa 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CacheRealizationFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CacheRealizationFunction.java
@@ -24,13 +24,13 @@ import java.util.Map;
import org.apache.logging.log4j.Logger;
import org.apache.geode.annotations.Immutable;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.execute.FunctionContext;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.execute.InternalFunction;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.api.CorrespondWith;
import org.apache.geode.management.api.RealizationResult;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.configuration.GatewayReceiver;
import org.apache.geode.management.configuration.MemberConfig;
import org.apache.geode.management.configuration.Region;
@@ -54,7 +54,7 @@ public class CacheRealizationFunction implements InternalFunction<List> {
@Override
public void execute(FunctionContext<List> context) {
- CacheElement cacheElement = (CacheElement) context.getArguments().get(0);
+ AbstractConfiguration cacheElement = (AbstractConfiguration) context.getArguments().get(0);
CacheElementOperation operation = (CacheElementOperation) context.getArguments().get(1);
InternalCache cache = (InternalCache) context.getCache();
@@ -80,8 +80,7 @@ public class CacheRealizationFunction implements InternalFunction<List> {
}
public RuntimeInfo executeGet(FunctionContext<List> context,
- InternalCache cache,
- CacheElement cacheElement) {
+ InternalCache cache, AbstractConfiguration cacheElement) {
ConfigurationRealizer realizer = realizers.get(cacheElement.getClass());
if (realizer == null) {
@@ -99,8 +98,7 @@ public class CacheRealizationFunction implements InternalFunction<List> {
}
public RealizationResult executeUpdate(FunctionContext<List> context,
- InternalCache cache,
- CacheElement cacheElement,
+ InternalCache cache, AbstractConfiguration cacheElement,
CacheElementOperation operation) {
ConfigurationRealizer realizer = realizers.get(cacheElement.getClass());
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/converters/RegionConverter.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/converters/RegionConverter.java
index 77632af..ff7a003 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/converters/RegionConverter.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/converters/RegionConverter.java
@@ -23,8 +23,8 @@ import org.apache.geode.cache.configuration.RegionAttributesDataPolicy;
import org.apache.geode.cache.configuration.RegionAttributesScope;
import org.apache.geode.cache.configuration.RegionAttributesType;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
public class RegionConverter extends ConfigurationConverter<Region, RegionConfig> {
@Override
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/ConfigurationManager.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/ConfigurationManager.java
index cb5ccb3..5e95236 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/ConfigurationManager.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/ConfigurationManager.java
@@ -21,7 +21,7 @@ import java.util.List;
import org.apache.geode.annotations.Experimental;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
+import org.apache.geode.management.configuration.AbstractConfiguration;
/**
* Defines the behavior to mutate a configuration change into a pre-existing cache config from a
@@ -30,7 +30,7 @@ import org.apache.geode.cache.configuration.CacheElement;
* type {@link CacheElement}, which represents the configuration change.
*/
@Experimental
-public interface ConfigurationManager<T extends CacheElement> {
+public interface ConfigurationManager<T extends AbstractConfiguration> {
/**
* specify how to add the config to the existing cache config. Note at this point, the config
* should have passed all the validations already.
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigManager.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigManager.java
index 75aee81..471b065 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigManager.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigManager.java
@@ -26,8 +26,8 @@ import org.apache.commons.lang3.NotImplementedException;
import org.apache.commons.lang3.StringUtils;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionConfig;
+import org.apache.geode.lang.Identifiable;
import org.apache.geode.management.configuration.Region;
import org.apache.geode.management.internal.configuration.converters.RegionConverter;
@@ -62,7 +62,7 @@ public class RegionConfigManager implements ConfigurationManager<Region> {
@Override
public Region get(String id, CacheConfig existing) {
- return converter.fromXmlObject(CacheElement.findElement(existing.getRegions(), id));
+ return converter.fromXmlObject(Identifiable.find(existing.getRegions(), id));
}
@Override
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/realizers/ConfigurationRealizer.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/realizers/ConfigurationRealizer.java
index 4504530..d8dfecb 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/realizers/ConfigurationRealizer.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/realizers/ConfigurationRealizer.java
@@ -17,19 +17,19 @@
package org.apache.geode.management.internal.configuration.realizers;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.api.CorrespondWith;
import org.apache.geode.management.api.RealizationResult;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.runtime.RuntimeInfo;
/**
* Defines the behavior to realize a configuration change in the cache on a server. Created with an
- * object of type {@link org.apache.geode.cache.configuration.CacheElement}, which represents the
+ * object of type {@link CacheElement}, which represents the
* configuration change.
*/
@Experimental
-public interface ConfigurationRealizer<T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo> {
+public interface ConfigurationRealizer<T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo> {
RealizationResult create(T config, InternalCache cache);
default boolean exists(T config, InternalCache cache) {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/CacheElementValidator.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/CacheElementValidator.java
index 740fea0..ec5d966 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/CacheElementValidator.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/CacheElementValidator.java
@@ -17,15 +17,15 @@ package org.apache.geode.management.internal.configuration.validators;
import org.apache.commons.lang3.StringUtils;
-import org.apache.geode.cache.configuration.CacheElement;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.internal.CacheElementOperation;
/**
* this is used to validate all the common attributes of CacheElement, eg. name and group
*/
-public class CacheElementValidator implements ConfigurationValidator<CacheElement> {
+public class CacheElementValidator implements ConfigurationValidator<AbstractConfiguration> {
@Override
- public void validate(CacheElementOperation operation, CacheElement config)
+ public void validate(CacheElementOperation operation, AbstractConfiguration config)
throws IllegalArgumentException {
if (StringUtils.isBlank(config.getId())) {
throw new IllegalArgumentException(
@@ -43,16 +43,16 @@ public class CacheElementValidator implements ConfigurationValidator<CacheElemen
}
}
- private void validateCreate(CacheElement config) {
+ private void validateCreate(AbstractConfiguration config) {
if (config.getGroups().size() > 1) {
throw new IllegalArgumentException(
"Can only create " + config.getClass().getSimpleName() + " in one group at a time.");
}
String group = config.getGroup();
- if (CacheElement.CLUSTER.equalsIgnoreCase(group)) {
+ if (AbstractConfiguration.CLUSTER.equalsIgnoreCase(group)) {
throw new IllegalArgumentException("'"
- + CacheElement.CLUSTER
+ + AbstractConfiguration.CLUSTER
+ "' is a reserved group name. Do not use it for member groups.");
}
if (group != null && group.contains(",")) {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/ConfigurationValidator.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/ConfigurationValidator.java
index 5acb0db..c9f8c40 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/ConfigurationValidator.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/ConfigurationValidator.java
@@ -14,10 +14,10 @@
*/
package org.apache.geode.management.internal.configuration.validators;
-import org.apache.geode.cache.configuration.CacheElement;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.internal.CacheElementOperation;
-public interface ConfigurationValidator<T extends CacheElement> {
+public interface ConfigurationValidator<T extends AbstractConfiguration> {
/**
* This is used to validate the configuration object passed in by the user
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/MemberValidator.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/MemberValidator.java
index 771b5d3..32b7b5e 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/MemberValidator.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/MemberValidator.java
@@ -25,10 +25,10 @@ import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.internal.configuration.mutators.ConfigurationManager;
import org.apache.geode.management.internal.exceptions.EntityExistsException;
@@ -44,9 +44,9 @@ public class MemberValidator {
this.persistenceService = persistenceService;
}
- public void validateCreate(CacheElement config, ConfigurationManager manager) {
+ public void validateCreate(AbstractConfiguration config, ConfigurationManager manager) {
- Map<String, CacheElement> existingElementsAndTheirGroups =
+ Map<String, AbstractConfiguration> existingElementsAndTheirGroups =
findCacheElement(config.getId(), manager);
if (existingElementsAndTheirGroups.size() == 0) {
return;
@@ -67,7 +67,8 @@ public class MemberValidator {
// if there is no common member, we still need to verify if the new config is compatible with
// the existing ones.
- for (Map.Entry<String, CacheElement> existing : existingElementsAndTheirGroups.entrySet()) {
+ for (Map.Entry<String, AbstractConfiguration> existing : existingElementsAndTheirGroups
+ .entrySet()) {
manager.checkCompatibility(config, existing.getKey(), existing.getValue());
}
}
@@ -79,14 +80,15 @@ public class MemberValidator {
/**
* this returns a map of CacheElement with this id, with the group as the key of the map
*/
- public Map<String, CacheElement> findCacheElement(String id, ConfigurationManager manager) {
- Map<String, CacheElement> results = new HashMap<>();
+ public Map<String, AbstractConfiguration> findCacheElement(String id,
+ ConfigurationManager manager) {
+ Map<String, AbstractConfiguration> results = new HashMap<>();
for (String group : persistenceService.getGroups()) {
CacheConfig cacheConfig = persistenceService.getCacheConfig(group);
if (cacheConfig == null) {
continue;
}
- CacheElement existing = manager.get(id, cacheConfig);
+ AbstractConfiguration existing = manager.get(id, cacheConfig);
if (existing != null) {
results.put(group, existing);
}
@@ -112,13 +114,13 @@ public class MemberValidator {
public Set<DistributedMember> findMembers(boolean includeLocators, String... groups) {
if (groups == null || groups.length == 0) {
- groups = new String[] {CacheElement.CLUSTER};
+ groups = new String[] {AbstractConfiguration.CLUSTER};
}
Set<DistributedMember> all = includeLocators ? getAllServersAndLocators() : getAllServers();
// if groups contains "cluster" group, return all members
- if (Arrays.asList(groups).contains(CacheElement.CLUSTER)) {
+ if (Arrays.asList(groups).contains(AbstractConfiguration.CLUSTER)) {
return all;
}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/RegionConfigValidator.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/RegionConfigValidator.java
index 32c82a9..2c6db7b 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/RegionConfigValidator.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/RegionConfigValidator.java
@@ -18,11 +18,11 @@ package org.apache.geode.management.internal.configuration.validators;
import org.apache.commons.lang3.StringUtils;
-import org.apache.geode.cache.configuration.CacheElement;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.RegionNameValidation;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.internal.CacheElementOperation;
import org.apache.geode.security.ResourcePermission;
@@ -47,7 +47,7 @@ public class RegionConfigValidator implements ConfigurationValidator<Region> {
}
}
- private void validateDelete(CacheElement config) {
+ private void validateDelete(AbstractConfiguration config) {
if (StringUtils.isNotBlank(config.getGroup())) {
throw new IllegalArgumentException(
"Group is an invalid option when deleting region.");
@@ -64,7 +64,7 @@ public class RegionConfigValidator implements ConfigurationValidator<Region> {
}
Integer redundantCopies = config.getRedundantCopies();
- if (config.getType().withRedundant() && redundantCopies == 0) {
+ if (config.getType().withRedundant() && redundantCopies != null && redundantCopies == 0) {
throw new IllegalArgumentException(
"redundantCopies cannot be 0 when the type has redundancy.");
}
diff --git a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
index acddb87..70d25d1 100644
--- a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
+++ b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
@@ -120,6 +120,37 @@ org/apache/geode/cache/client/SubscriptionNotEnabledException,true,-821244673777
org/apache/geode/cache/client/internal/ContainsKeyOp$MODE,false
org/apache/geode/cache/client/internal/TXSynchronizationOp$CompletionType,false
org/apache/geode/cache/client/internal/pooling/ConnectionDestroyedException,true,-6918516787578041316
+org/apache/geode/cache/configuration/CacheConfig$AsyncEventQueue,false,asyncEventListener:org/apache/geode/cache/configuration/DeclarableType,batchSize:java/lang/String,batchTimeInterval:java/lang/String,diskStoreName:java/lang/String,diskSynchronous:java/lang/Boolean,dispatcherThreads:java/lang/String,enableBatchConflation:java/lang/Boolean,forwardExpirationDestroy:java/lang/Boolean,gatewayEventFilters:java/util/List,gatewayEventSubstitutionFilter:org/apache/geode/cache/configuration/De [...]
+org/apache/geode/cache/configuration/CacheElement,false
+org/apache/geode/cache/configuration/ClassNameType,false,className:java/lang/String
+org/apache/geode/cache/configuration/DeclarableType,false,parameters:java/util/List
+org/apache/geode/cache/configuration/DiskDirsType,false,diskDirs:java/util/List
+org/apache/geode/cache/configuration/DiskStoreType,false,allowForceCompaction:java/lang/Boolean,autoCompact:java/lang/Boolean,compactionThreshold:java/lang/String,diskDirs:org/apache/geode/cache/configuration/DiskDirsType,diskUsageCriticalPercentage:java/lang/String,diskUsageWarningPercentage:java/lang/String,maxOplogSize:java/lang/String,name:java/lang/String,queueSize:java/lang/String,timeInterval:java/lang/String,writeBufferSize:java/lang/String
+org/apache/geode/cache/configuration/EnumActionDestroyOverflow,false,value:java/lang/String
+org/apache/geode/cache/configuration/EnumReadableWritable,false,value:java/lang/String
+org/apache/geode/cache/configuration/GatewayReceiverConfig,false,bindAddress:java/lang/String,endPort:java/lang/String,gatewayTransportFilters:java/util/List,hostnameForSenders:java/lang/String,manualStart:java/lang/Boolean,maximumTimeBetweenPings:java/lang/String,socketBufferSize:java/lang/String,startPort:java/lang/String
+org/apache/geode/cache/configuration/JndiBindingsType$JndiBinding,false,blockingTimeoutSeconds:java/lang/String,configProperties:java/util/List,connPooledDatasourceClass:java/lang/String,connectionUrl:java/lang/String,idleTimeoutSeconds:java/lang/String,initPoolSize:java/lang/String,jdbcDriverClass:java/lang/String,jndiName:java/lang/String,loginTimeoutSeconds:java/lang/String,managedConnFactoryClass:java/lang/String,maxPoolSize:java/lang/String,password:java/lang/String,transactionType: [...]
+org/apache/geode/cache/configuration/JndiBindingsType$JndiBinding$ConfigProperty,false,configPropertyName:java/lang/String,configPropertyType:java/lang/String,configPropertyValue:java/lang/String
+org/apache/geode/cache/configuration/ObjectType,false,declarable:org/apache/geode/cache/configuration/DeclarableType,string:java/lang/String
+org/apache/geode/cache/configuration/ParameterType,false,name:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesDataPolicy,false,value:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesIndexUpdateType,false,value:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesMirrorType,false,value:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesScope,false,value:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesType,false,asyncEventQueueIds:java/lang/String,cacheListeners:java/util/List,cacheLoader:org/apache/geode/cache/configuration/DeclarableType,cacheWriter:org/apache/geode/cache/configuration/DeclarableType,cloningEnabled:java/lang/Boolean,compressor:org/apache/geode/cache/configuration/ClassNameType,concurrencyChecksEnabled:java/lang/Boolean,concurrencyLevel:java/lang/String,dataPolicy:org/apache/geode/cache/configuration/RegionAttribut [...]
+org/apache/geode/cache/configuration/RegionAttributesType$DiskWriteAttributes,false,asynchronousWrites:org/apache/geode/cache/configuration/RegionAttributesType$DiskWriteAttributes$AsynchronousWrites,maxOplogSize:java/lang/String,rollOplogs:java/lang/String,synchronousWrites:java/lang/Object
+org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes,false,lruEntryCount:org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruEntryCount,lruHeapPercentage:org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruHeapPercentage,lruMemorySize:org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruMemorySize
+org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruEntryCount,false,action:org/apache/geode/cache/configuration/EnumActionDestroyOverflow,maximum:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruHeapPercentage,false,action:org/apache/geode/cache/configuration/EnumActionDestroyOverflow
+org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruMemorySize,false,maximum:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesType$ExpirationAttributesDetail,false,action:java/lang/String,customExpiry:org/apache/geode/cache/configuration/DeclarableType,timeout:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesType$ExpirationAttributesType,false,expirationAttributes:org/apache/geode/cache/configuration/RegionAttributesType$ExpirationAttributesDetail
+org/apache/geode/cache/configuration/RegionAttributesType$MembershipAttributes,false,lossAction:java/lang/String,requiredRoles:java/util/List,resumptionAction:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesType$PartitionAttributes,false,colocatedWith:java/lang/String,fixedPartitionAttributes:java/util/List,localMaxMemory:java/lang/String,partitionListeners:java/util/List,partitionResolver:org/apache/geode/cache/configuration/DeclarableType,recoveryDelay:java/lang/String,redundantCopies:java/lang/String,startupRecoveryDelay:java/lang/String,totalMaxMemory:java/lang/String,totalNumBuckets:java/lang/String
+org/apache/geode/cache/configuration/RegionAttributesType$SubscriptionAttributes,false,interestPolicy:java/lang/String
+org/apache/geode/cache/configuration/RegionConfig,false,entries:java/util/List,indexes:java/util/List,name:java/lang/String,regionAttributes:org/apache/geode/cache/configuration/RegionAttributesType,regionElements:java/util/List,regions:java/util/List,type:java/lang/String
+org/apache/geode/cache/configuration/RegionConfig$Entry,false,key:org/apache/geode/cache/configuration/ObjectType,value:org/apache/geode/cache/configuration/ObjectType
+org/apache/geode/cache/configuration/RegionConfig$Index,false,expression:java/lang/String,fromClause:java/lang/String,imports:java/lang/String,keyIndex:java/lang/Boolean,name:java/lang/String,type:java/lang/String
org/apache/geode/cache/execute/EmptyRegionFunctionException,true,1
org/apache/geode/cache/execute/FunctionAdapter,true,-4891043890440825485
org/apache/geode/cache/execute/FunctionException,true,4893171227542647452
diff --git a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-management-serializables.txt b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-management-serializables.txt
index 14dd558..8803682 100644
--- a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-management-serializables.txt
+++ b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-management-serializables.txt
@@ -1,43 +1,13 @@
-org/apache/geode/cache/configuration/CacheConfig$AsyncEventQueue,false,asyncEventListener:org/apache/geode/cache/configuration/DeclarableType,batchSize:java/lang/String,batchTimeInterval:java/lang/String,diskStoreName:java/lang/String,diskSynchronous:java/lang/Boolean,dispatcherThreads:java/lang/String,enableBatchConflation:java/lang/Boolean,forwardExpirationDestroy:java/lang/Boolean,gatewayEventFilters:java/util/List,gatewayEventSubstitutionFilter:org/apache/geode/cache/configuration/De [...]
-org/apache/geode/cache/configuration/CacheElement,false,groups:java/util/List
-org/apache/geode/cache/configuration/ClassNameType,false,className:java/lang/String
-org/apache/geode/cache/configuration/DeclarableType,false,parameters:java/util/List
-org/apache/geode/cache/configuration/DiskDirsType,false,diskDirs:java/util/List
-org/apache/geode/cache/configuration/DiskStoreType,false,allowForceCompaction:java/lang/Boolean,autoCompact:java/lang/Boolean,compactionThreshold:java/lang/String,diskDirs:org/apache/geode/cache/configuration/DiskDirsType,diskUsageCriticalPercentage:java/lang/String,diskUsageWarningPercentage:java/lang/String,maxOplogSize:java/lang/String,name:java/lang/String,queueSize:java/lang/String,timeInterval:java/lang/String,writeBufferSize:java/lang/String
-org/apache/geode/cache/configuration/EnumActionDestroyOverflow,false,value:java/lang/String
-org/apache/geode/cache/configuration/EnumReadableWritable,false,value:java/lang/String
-org/apache/geode/cache/configuration/GatewayReceiverConfig,false,bindAddress:java/lang/String,endPort:java/lang/String,gatewayTransportFilters:java/util/List,hostnameForSenders:java/lang/String,manualStart:java/lang/Boolean,maximumTimeBetweenPings:java/lang/String,socketBufferSize:java/lang/String,startPort:java/lang/String
-org/apache/geode/cache/configuration/JndiBindingsType$JndiBinding,false,blockingTimeoutSeconds:java/lang/String,configProperties:java/util/List,connPooledDatasourceClass:java/lang/String,connectionUrl:java/lang/String,idleTimeoutSeconds:java/lang/String,initPoolSize:java/lang/String,jdbcDriverClass:java/lang/String,jndiName:java/lang/String,loginTimeoutSeconds:java/lang/String,managedConnFactoryClass:java/lang/String,maxPoolSize:java/lang/String,password:java/lang/String,transactionType: [...]
-org/apache/geode/cache/configuration/JndiBindingsType$JndiBinding$ConfigProperty,false,configPropertyName:java/lang/String,configPropertyType:java/lang/String,configPropertyValue:java/lang/String
-org/apache/geode/cache/configuration/ObjectType,false,declarable:org/apache/geode/cache/configuration/DeclarableType,string:java/lang/String
-org/apache/geode/cache/configuration/ParameterType,false,name:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesDataPolicy,false,value:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesIndexUpdateType,false,value:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesMirrorType,false,value:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesScope,false,value:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesType,false,asyncEventQueueIds:java/lang/String,cacheListeners:java/util/List,cacheLoader:org/apache/geode/cache/configuration/DeclarableType,cacheWriter:org/apache/geode/cache/configuration/DeclarableType,cloningEnabled:java/lang/Boolean,compressor:org/apache/geode/cache/configuration/ClassNameType,concurrencyChecksEnabled:java/lang/Boolean,concurrencyLevel:java/lang/String,dataPolicy:org/apache/geode/cache/configuration/RegionAttribut [...]
-org/apache/geode/cache/configuration/RegionAttributesType$DiskWriteAttributes,false,asynchronousWrites:org/apache/geode/cache/configuration/RegionAttributesType$DiskWriteAttributes$AsynchronousWrites,maxOplogSize:java/lang/String,rollOplogs:java/lang/String,synchronousWrites:java/lang/Object
-org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes,false,lruEntryCount:org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruEntryCount,lruHeapPercentage:org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruHeapPercentage,lruMemorySize:org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruMemorySize
-org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruEntryCount,false,action:org/apache/geode/cache/configuration/EnumActionDestroyOverflow,maximum:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruHeapPercentage,false,action:org/apache/geode/cache/configuration/EnumActionDestroyOverflow
-org/apache/geode/cache/configuration/RegionAttributesType$EvictionAttributes$LruMemorySize,false,maximum:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesType$ExpirationAttributesDetail,false,action:java/lang/String,customExpiry:org/apache/geode/cache/configuration/DeclarableType,timeout:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesType$ExpirationAttributesType,false,expirationAttributes:org/apache/geode/cache/configuration/RegionAttributesType$ExpirationAttributesDetail
-org/apache/geode/cache/configuration/RegionAttributesType$MembershipAttributes,false,lossAction:java/lang/String,requiredRoles:java/util/List,resumptionAction:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesType$PartitionAttributes,false,colocatedWith:java/lang/String,fixedPartitionAttributes:java/util/List,localMaxMemory:java/lang/String,partitionListeners:java/util/List,partitionResolver:org/apache/geode/cache/configuration/DeclarableType,recoveryDelay:java/lang/String,redundantCopies:java/lang/String,startupRecoveryDelay:java/lang/String,totalMaxMemory:java/lang/String,totalNumBuckets:java/lang/String
-org/apache/geode/cache/configuration/RegionAttributesType$SubscriptionAttributes,false,interestPolicy:java/lang/String
-org/apache/geode/cache/configuration/RegionConfig,false,entries:java/util/List,indexes:java/util/List,name:java/lang/String,regionAttributes:org/apache/geode/cache/configuration/RegionAttributesType,regionElements:java/util/List,regions:java/util/List,type:java/lang/String
-org/apache/geode/cache/configuration/RegionConfig$Entry,false,key:org/apache/geode/cache/configuration/ObjectType,value:org/apache/geode/cache/configuration/ObjectType
-org/apache/geode/cache/configuration/RegionConfig$Index,false,expression:java/lang/String,fromClause:java/lang/String,imports:java/lang/String,keyIndex:java/lang/Boolean,name:java/lang/String,type:java/lang/String
-org/apache/geode/cache/configuration/RegionType,false
org/apache/geode/management/api/ClusterManagementResult$StatusCode,false
org/apache/geode/management/api/RealizationResult,false,memberName:java/lang/String,message:java/lang/String,success:boolean
+org/apache/geode/management/configuration/AbstractConfiguration,false,groups:java/util/List
org/apache/geode/management/configuration/ClassName,true,1,className:java/lang/String,initProperties:java/util/Properties
org/apache/geode/management/configuration/GatewayReceiver,false,endPort:java/lang/Integer,gatewayTransportFilters:java/util/List,manualStart:java/lang/Boolean,maximumTimeBetweenPings:java/lang/Integer,socketBufferSize:java/lang/Integer,startPort:java/lang/Integer
org/apache/geode/management/configuration/Index,false,expression:java/lang/String,keyIndex:java/lang/Boolean,name:java/lang/String,regionPath:java/lang/String
org/apache/geode/management/configuration/MemberConfig,false,id:java/lang/String
org/apache/geode/management/configuration/Pdx,false,diskStoreName:java/lang/String,ignoreUnreadFields:java/lang/Boolean,pdxSerializer:org/apache/geode/management/configuration/ClassName,persistent:java/lang/Boolean,readSerialized:java/lang/Boolean
-org/apache/geode/management/configuration/Region,false,diskStoreName:java/lang/String,keyConstraint:java/lang/String,name:java/lang/String,redundantCopies:java/lang/Integer,type:org/apache/geode/cache/configuration/RegionType,valueConstraint:java/lang/String
+org/apache/geode/management/configuration/Region,false,diskStoreName:java/lang/String,keyConstraint:java/lang/String,name:java/lang/String,redundantCopies:java/lang/Integer,type:org/apache/geode/management/configuration/RegionType,valueConstraint:java/lang/String
+org/apache/geode/management/configuration/RegionType,false
org/apache/geode/management/runtime/CacheServerInfo,true,1,bindAddress:java/lang/String,isRunning:boolean,maxConnections:int,maxThreads:int,port:int
org/apache/geode/management/runtime/GatewayReceiverInfo,false,bindAddress:java/lang/String,connectedSenders:java/lang/String[],hostnameForSenders:java/lang/String,port:int,running:boolean,senderCount:int
org/apache/geode/management/runtime/MemberInformation,true,1,cacheServerList:java/util/List,cacheXmlFilePath:java/lang/String,clientCount:int,cpuUsage:double,groups:java/lang/String,heapUsage:long,host:java/lang/String,hostedRegions:java/util/Set,httpServiceBindAddress:java/lang/String,httpServicePort:int,id:java/lang/String,initHeapSize:long,isCoordinator:boolean,isSecured:boolean,isServer:boolean,locatorPort:int,locators:java/lang/String,logFilePath:java/lang/String,maxHeapSize:long,of [...]
diff --git a/geode-core/src/test/java/org/apache/geode/cache/configuration/CacheConfigTest.java b/geode-core/src/test/java/org/apache/geode/cache/configuration/CacheConfigTest.java
index 87347e8..75473c2 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/configuration/CacheConfigTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/configuration/CacheConfigTest.java
@@ -24,6 +24,7 @@ import org.junit.Before;
import org.junit.Test;
import org.apache.geode.internal.config.JAXBService;
+import org.apache.geode.management.configuration.RegionType;
public class CacheConfigTest {
diff --git a/geode-core/src/test/java/org/apache/geode/cache/configuration/DeclarableTypeTest.java b/geode-core/src/test/java/org/apache/geode/cache/configuration/DeclarableTypeTest.java
index 3f51557..6e2e95a 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/configuration/DeclarableTypeTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/configuration/DeclarableTypeTest.java
@@ -24,7 +24,6 @@ import java.util.Properties;
import org.junit.Test;
-
public class DeclarableTypeTest {
@Test
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceServiceTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceServiceTest.java
index c5a573c..5dddf5d 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceServiceTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceServiceTest.java
@@ -43,11 +43,11 @@ import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.configuration.GatewayReceiverConfig;
import org.apache.geode.cache.configuration.JndiBindingsType;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.internal.config.JAXBService;
import org.apache.geode.internal.config.JAXBServiceTest;
import org.apache.geode.internal.config.JAXBServiceTest.ElementOne;
import org.apache.geode.internal.config.JAXBServiceTest.ElementTwo;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.internal.configuration.domain.Configuration;
import org.apache.geode.management.internal.configuration.utils.XmlUtils;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/config/JAXBServiceTest.java b/geode-core/src/test/java/org/apache/geode/internal/config/JAXBServiceTest.java
index 58414c4..c6936b3 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/config/JAXBServiceTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/config/JAXBServiceTest.java
@@ -38,8 +38,8 @@ import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.GatewayReceiverConfig;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.internal.lang.SystemPropertyHelper;
+import org.apache.geode.management.configuration.RegionType;
public class JAXBServiceTest {
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/api/ClusterManagementResultTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/api/ClusterManagementResultTest.java
index 43e388f..b003209 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/api/ClusterManagementResultTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/api/ClusterManagementResultTest.java
@@ -27,7 +27,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;
import org.junit.Test;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementListResult;
import org.apache.geode.management.api.ClusterManagementRealizationResult;
import org.apache.geode.management.api.ClusterManagementResult;
@@ -35,6 +34,7 @@ import org.apache.geode.management.api.ClusterManagementResult.StatusCode;
import org.apache.geode.management.api.ConfigurationResult;
import org.apache.geode.management.api.RealizationResult;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.runtime.RuntimeRegionInfo;
import org.apache.geode.util.internal.GeodeJsonMapper;
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/api/LocatorClusterManagementServiceTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/api/LocatorClusterManagementServiceTest.java
index 8b1da6a..276b65f 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/api/LocatorClusterManagementServiceTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/api/LocatorClusterManagementServiceTest.java
@@ -48,7 +48,6 @@ import org.junit.Test;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.configuration.GatewayReceiverConfig;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
@@ -61,6 +60,7 @@ import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.RealizationResult;
import org.apache.geode.management.configuration.MemberConfig;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.internal.CacheElementOperation;
import org.apache.geode.management.internal.ClusterManagementOperationStatusResult;
import org.apache.geode.management.internal.configuration.mutators.ConfigurationManager;
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/converters/RegionConverterTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/converters/RegionConverterTest.java
index 2eeeaac..f67caa5 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/converters/RegionConverterTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/converters/RegionConverterTest.java
@@ -15,6 +15,7 @@
package org.apache.geode.management.internal.configuration.converters;
+import static org.apache.geode.lang.Identifiable.find;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -27,13 +28,12 @@ import org.junit.Test;
import org.apache.geode.cache.RegionShortcut;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionAttributesDataPolicy;
import org.apache.geode.cache.configuration.RegionAttributesType;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.internal.config.JAXBService;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
public class RegionConverterTest {
private RegionConverter converter;
@@ -128,7 +128,7 @@ public class RegionConverterTest {
config.setType(shortcut.name());
config.setName(shortcut.name());
config.setRegionAttributes(converter.createRegionAttributesByType(shortcut.name()));
- RegionConfig masterRegion = CacheElement.findElement(master.getRegions(), shortcut.name());
+ RegionConfig masterRegion = find(master.getRegions(), shortcut.name());
assertThat(config).isEqualToComparingFieldByFieldRecursively(masterRegion);
}
}
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigManagerTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigManagerTest.java
index 6e56ff8..5229795 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigManagerTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/mutators/RegionConfigManagerTest.java
@@ -21,8 +21,8 @@ import static org.mockito.Mockito.spy;
import org.junit.Before;
import org.junit.Test;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
public class RegionConfigManagerTest {
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/realizers/RegionConfigRealizerTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/realizers/RegionConfigRealizerTest.java
index 198f25b..d6953f4 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/realizers/RegionConfigRealizerTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/realizers/RegionConfigRealizerTest.java
@@ -30,9 +30,9 @@ import org.mockito.ArgumentCaptor;
import org.apache.geode.cache.DataPolicy;
import org.apache.geode.cache.PartitionAttributes;
import org.apache.geode.cache.RegionFactory;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.internal.CacheElementOperation;
import org.apache.geode.management.internal.configuration.validators.RegionConfigValidator;
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/validators/MemberValidatorTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/validators/MemberValidatorTest.java
index ea7a7d4..d48adb4 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/validators/MemberValidatorTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/validators/MemberValidatorTest.java
@@ -30,11 +30,11 @@ import org.junit.Test;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.internal.configuration.mutators.RegionConfigManager;
import org.apache.geode.management.internal.exceptions.EntityExistsException;
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/validators/RegionConfigValidatorTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/validators/RegionConfigValidatorTest.java
index 3d0a9cd..b8da0e4 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/validators/RegionConfigValidatorTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/validators/RegionConfigValidatorTest.java
@@ -28,10 +28,10 @@ import static org.mockito.Mockito.when;
import org.junit.Before;
import org.junit.Test;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.security.SecurityService;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.internal.CacheElementOperation;
import org.apache.geode.security.ResourcePermission;
diff --git a/geode-junit/src/main/java/org/apache/geode/test/junit/assertions/ClusterManagementListResultAssert.java b/geode-junit/src/main/java/org/apache/geode/test/junit/assertions/ClusterManagementListResultAssert.java
index 476b0ce..b519b02 100644
--- a/geode-junit/src/main/java/org/apache/geode/test/junit/assertions/ClusterManagementListResultAssert.java
+++ b/geode-junit/src/main/java/org/apache/geode/test/junit/assertions/ClusterManagementListResultAssert.java
@@ -22,14 +22,14 @@ import java.util.List;
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.ListAssert;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.management.api.ClusterManagementListResult;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ConfigurationResult;
import org.apache.geode.management.api.CorrespondWith;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.runtime.RuntimeInfo;
-public class ClusterManagementListResultAssert<T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo>
+public class ClusterManagementListResultAssert<T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo>
extends
AbstractAssert<ClusterManagementListResultAssert<T, R>, ClusterManagementListResult<T, R>> {
public ClusterManagementListResultAssert(
@@ -70,7 +70,7 @@ public class ClusterManagementListResultAssert<T extends CacheElement & Correspo
return assertThat(getActual().getRuntimeResult());
}
- public static <T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResultAssert<T, R> assertManagementListResult(
+ public static <T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResultAssert<T, R> assertManagementListResult(
ClusterManagementListResult<T, R> result) {
return new ClusterManagementListResultAssert<>(result, ClusterManagementListResultAssert.class);
}
diff --git a/geode-junit/src/main/java/org/apache/geode/test/junit/assertions/ClusterManagementRealizationResultAssert.java b/geode-junit/src/main/java/org/apache/geode/test/junit/assertions/ClusterManagementRealizationResultAssert.java
index 10d2629..cab50d2 100644
--- a/geode-junit/src/main/java/org/apache/geode/test/junit/assertions/ClusterManagementRealizationResultAssert.java
+++ b/geode-junit/src/main/java/org/apache/geode/test/junit/assertions/ClusterManagementRealizationResultAssert.java
@@ -46,7 +46,7 @@ public class ClusterManagementRealizationResultAssert
public ClusterManagementRealizationResultAssert hasStatusCode(
ClusterManagementResult.StatusCode... codes) {
- assertThat(actual.getStatusCode()).isIn(codes);
+ assertThat(actual.getStatusCode()).isIn((Object[]) codes);
return this;
}
diff --git a/geode-lucene/src/main/resources/org/apache/geode/internal/sanctioned-geode-lucene-serializables.txt b/geode-lucene/src/main/resources/org/apache/geode/internal/sanctioned-geode-lucene-serializables.txt
index a8e32c5..019dc9a 100755
--- a/geode-lucene/src/main/resources/org/apache/geode/internal/sanctioned-geode-lucene-serializables.txt
+++ b/geode-lucene/src/main/resources/org/apache/geode/internal/sanctioned-geode-lucene-serializables.txt
@@ -20,4 +20,4 @@ org/apache/geode/cache/lucene/internal/distributed/IndexingInProgressFunction,tr
org/apache/geode/cache/lucene/internal/distributed/LuceneQueryFunction,true,1
org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction,true,1
org/apache/geode/cache/lucene/internal/results/LuceneGetPageFunction,true,1
-org/apache/geode/cache/lucene/management/configuration/Index,false,field:java/util/List,name:java/lang/String,serializer:org/apache/geode/cache/configuration/DeclarableType
+org/apache/geode/cache/lucene/management/configuration/Index,false,field:java/util/List,name:java/lang/String,serializer:org/apache/geode/cache/configuration/DeclarableType
\ No newline at end of file
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/XSDRootElement.java b/geode-management/src/main/java/org/apache/geode/cache/configuration/XSDRootElement.java
deleted file mode 100644
index 477e1a6..0000000
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/XSDRootElement.java
+++ /dev/null
@@ -1,32 +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.geode.cache.configuration;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-@Retention(RUNTIME)
-@Target({TYPE})
-public @interface XSDRootElement {
- String namespace() default "";
-
- String schemaLocation() default "";
-}
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/package-info.java b/geode-management/src/main/java/org/apache/geode/cache/configuration/package-info.java
deleted file mode 100644
index c97d892..0000000
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/package-info.java
+++ /dev/null
@@ -1,25 +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.
- */
-
-@XmlSchema(namespace = "http://geode.apache.org/schema/cache",
- xmlns = {@XmlNs(prefix = "", namespaceURI = "http://geode.apache.org/schema/cache")},
- elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-
-package org.apache.geode.cache.configuration;
-
-import javax.xml.bind.annotation.XmlNs;
-import javax.xml.bind.annotation.XmlSchema;
diff --git a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementListResult.java b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementListResult.java
index b415db3..47a2bf0 100644
--- a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementListResult.java
+++ b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementListResult.java
@@ -23,17 +23,16 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.CacheElement;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.runtime.RuntimeInfo;
/**
- * returned from {@link ClusterManagementService#list(CacheElement)}
*
* @param <T> the type of the static config, e.g. RegionConfig
* @param <R> the type of the corresponding runtime information, e.g. RuntimeRegionInfo
*/
@Experimental
-public class ClusterManagementListResult<T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo>
+public class ClusterManagementListResult<T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo>
extends ClusterManagementResult {
/**
* for internal use only
diff --git a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementRealizationException.java b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementRealizationException.java
index 728fc45..5a8f374 100644
--- a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementRealizationException.java
+++ b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementRealizationException.java
@@ -16,10 +16,9 @@ package org.apache.geode.management.api;
import java.util.List;
-import org.apache.geode.cache.configuration.CacheElement;
-
/**
- * Thrown by {@link ClusterManagementService#create(CacheElement)}, update, and delete operations
+ * Thrown by {@link ClusterManagementService#create(AbstractConfiguration)}, update, and delete
+ * operations
* which have a possibility of "partial" failure.
*/
public class ClusterManagementRealizationException extends ClusterManagementException {
@@ -34,7 +33,8 @@ public class ClusterManagementRealizationException extends ClusterManagementExce
}
/**
- * A {@link ClusterManagementService#create(CacheElement)} operation may fail on all members or
+ * A {@link ClusterManagementService#create(AbstractConfiguration)} operation may fail on all
+ * members or
* only some. This will return the per-member status.
*/
public List<RealizationResult> getMemberStatuses() {
diff --git a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementRealizationResult.java b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementRealizationResult.java
index 37bda79..308806f 100644
--- a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementRealizationResult.java
+++ b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementRealizationResult.java
@@ -18,13 +18,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.CacheElement;
-/**
- * returned from {@link ClusterManagementService#create(CacheElement)} /
- * {@link ClusterManagementService#update(CacheElement)} /
- * {@link ClusterManagementService#delete(CacheElement)} methods
- */
@Experimental
public class ClusterManagementRealizationResult extends ClusterManagementResult {
private List<RealizationResult> memberStatuses = new ArrayList<>();
@@ -53,7 +47,8 @@ public class ClusterManagementRealizationResult extends ClusterManagementResult
}
/**
- * For a {@link ClusterManagementService#create(CacheElement)} operation, this will return
+ * For a {@link ClusterManagementService#create(AbstractConfiguration)} operation, this will
+ * return
* per-member status of the create.
*/
public List<RealizationResult> getMemberStatuses() {
diff --git a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementService.java b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementService.java
index 663f320..aee06a4 100644
--- a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementService.java
+++ b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementService.java
@@ -18,7 +18,7 @@ package org.apache.geode.management.api;
import java.util.concurrent.CompletableFuture;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.CacheElement;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.runtime.OperationResult;
import org.apache.geode.management.runtime.RuntimeInfo;
@@ -36,9 +36,8 @@ public interface ClusterManagementService extends AutoCloseable {
* cluster, as well as the group this config belongs to
* @return a {@link ClusterManagementRealizationResult} indicating the success of the creation
* @throws ClusterManagementRealizationException if unsuccessful
- * @see CacheElement
*/
- <T extends CacheElement> ClusterManagementRealizationResult create(T config);
+ <T extends AbstractConfiguration> ClusterManagementRealizationResult create(T config);
/**
* This method will delete the element on all the applicable members in the cluster and update the
@@ -48,9 +47,8 @@ public interface ClusterManagementService extends AutoCloseable {
* cluster
* @return a {@link ClusterManagementRealizationResult} indicating the success of the deletion
* @throws ClusterManagementRealizationException if unsuccessful
- * @see CacheElement
*/
- <T extends CacheElement> ClusterManagementRealizationResult delete(T config);
+ <T extends AbstractConfiguration> ClusterManagementRealizationResult delete(T config);
/**
* This method will update the element on all the applicable members in the cluster and persist
@@ -60,9 +58,8 @@ public interface ClusterManagementService extends AutoCloseable {
* cluster
* @return a {@link ClusterManagementRealizationResult} indicating the success of the update
* @throws ClusterManagementRealizationException if unsuccessful
- * @see CacheElement
*/
- <T extends CacheElement> ClusterManagementRealizationResult update(T config);
+ <T extends AbstractConfiguration> ClusterManagementRealizationResult update(T config);
/**
* This method will list instances of the element type in the cluster configuration, along with
@@ -73,9 +70,8 @@ public interface ClusterManagementService extends AutoCloseable {
* @return a {@link ClusterManagementListResult} holding a list of matching instances in
* {@link ClusterManagementListResult#getResult()}
* @throws ClusterManagementException if unsuccessful
- * @see CacheElement
*/
- <T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> list(
+ <T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> list(
T config);
/**
@@ -88,9 +84,8 @@ public interface ClusterManagementService extends AutoCloseable {
* {@link ClusterManagementListResult#getResult()}
* @throws ClusterManagementException if unsuccesful or, no matching element is found, or multiple
* matches are found
- * @see CacheElement
*/
- <T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> get(
+ <T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> get(
T config);
/**
diff --git a/geode-management/src/main/java/org/apache/geode/management/api/ConfigurationResult.java b/geode-management/src/main/java/org/apache/geode/management/api/ConfigurationResult.java
index d955c43..fc40347 100644
--- a/geode-management/src/main/java/org/apache/geode/management/api/ConfigurationResult.java
+++ b/geode-management/src/main/java/org/apache/geode/management/api/ConfigurationResult.java
@@ -19,7 +19,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.CacheElement;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.runtime.RuntimeInfo;
/**
@@ -30,7 +30,7 @@ import org.apache.geode.management.runtime.RuntimeInfo;
* @param <R> the runtimeInfo type
*/
@Experimental
-public class ConfigurationResult<T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo> {
+public class ConfigurationResult<T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo> {
private T configuration;
private List<R> runtimeInfo = new ArrayList<>();
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheElement.java b/geode-management/src/main/java/org/apache/geode/management/configuration/AbstractConfiguration.java
similarity index 56%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/CacheElement.java
rename to geode-management/src/main/java/org/apache/geode/management/configuration/AbstractConfiguration.java
index 3643e4e..de21d25 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheElement.java
+++ b/geode-management/src/main/java/org/apache/geode/management/configuration/AbstractConfiguration.java
@@ -1,21 +1,19 @@
/*
- * 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
+ * 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.
+ * 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.geode.cache.configuration;
+package org.apache.geode.management.configuration;
import java.io.Serializable;
import java.util.ArrayList;
@@ -32,23 +30,12 @@ import org.apache.geode.lang.Identifiable;
import org.apache.geode.management.api.JsonSerializable;
@Experimental
-public abstract class CacheElement implements Identifiable<String>, Serializable, JsonSerializable {
+public abstract class AbstractConfiguration
+ implements Identifiable<String>, Serializable, JsonSerializable {
public static final String CLUSTER = "cluster";
protected List<String> groups = new ArrayList<>();
- public static <T extends Identifiable> boolean exists(List<T> list, String id) {
- return list.stream().anyMatch(o -> o.getId().equals(id));
- }
-
- public static <T extends Identifiable> T findElement(List<T> list, String id) {
- return list.stream().filter(o -> o.getId().equals(id)).findFirst().orElse(null);
- }
-
- public static <T extends Identifiable> void removeElement(List<T> list, String id) {
- list.removeIf(t -> t.getId().equals(id));
- }
-
/**
* this returns a non-null value
* for cluster level element, it will return "cluster" for sure.
diff --git a/geode-management/src/main/java/org/apache/geode/management/configuration/GatewayReceiver.java b/geode-management/src/main/java/org/apache/geode/management/configuration/GatewayReceiver.java
index 61835c6..34aca15 100644
--- a/geode-management/src/main/java/org/apache/geode/management/configuration/GatewayReceiver.java
+++ b/geode-management/src/main/java/org/apache/geode/management/configuration/GatewayReceiver.java
@@ -19,8 +19,6 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import org.apache.geode.cache.configuration.CacheElement;
-import org.apache.geode.cache.configuration.DeclarableType;
import org.apache.geode.management.api.CorrespondWith;
import org.apache.geode.management.api.RestfulEndpoint;
import org.apache.geode.management.runtime.GatewayReceiverInfo;
@@ -32,7 +30,7 @@ import org.apache.geode.management.runtime.GatewayReceiverInfo;
* setting the bindAddress and hostname for clients are not supported by this api.
*/
-public class GatewayReceiver extends CacheElement implements RestfulEndpoint,
+public class GatewayReceiver extends AbstractConfiguration implements RestfulEndpoint,
CorrespondWith<GatewayReceiverInfo> {
@Override
@JsonIgnore
@@ -50,7 +48,7 @@ public class GatewayReceiver extends CacheElement implements RestfulEndpoint,
return GATEWAY_RECEIVERS_ENDPOINTS;
}
- private List<DeclarableType> gatewayTransportFilters;
+ private List<ClassName> gatewayTransportFilters;
private Integer startPort;
private Integer endPort;
private Integer maximumTimeBetweenPings;
@@ -61,7 +59,7 @@ public class GatewayReceiver extends CacheElement implements RestfulEndpoint,
* get the list of transport filters
* if you modify the returned list, you will be modifying the list owned by this config object.
*/
- public List<DeclarableType> getGatewayTransportFilters() {
+ public List<ClassName> getGatewayTransportFilters() {
return gatewayTransportFilters;
}
@@ -69,7 +67,7 @@ public class GatewayReceiver extends CacheElement implements RestfulEndpoint,
* set the gateway transport filters
*/
public void setGatewayTransportFilters(
- List<DeclarableType> gatewayTransportFilters) {
+ List<ClassName> gatewayTransportFilters) {
this.gatewayTransportFilters = gatewayTransportFilters;
}
diff --git a/geode-management/src/main/java/org/apache/geode/management/configuration/Index.java b/geode-management/src/main/java/org/apache/geode/management/configuration/Index.java
index 7fcf0b0..4f119dd 100644
--- a/geode-management/src/main/java/org/apache/geode/management/configuration/Index.java
+++ b/geode-management/src/main/java/org/apache/geode/management/configuration/Index.java
@@ -19,13 +19,11 @@ package org.apache.geode.management.configuration;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils;
-import org.apache.geode.cache.configuration.CacheElement;
-import org.apache.geode.cache.configuration.RegionConfig;
import org.apache.geode.management.api.CorrespondWith;
import org.apache.geode.management.api.RestfulEndpoint;
import org.apache.geode.management.runtime.RuntimeInfo;
-public class Index extends CacheElement
+public class Index extends AbstractConfiguration
implements RestfulEndpoint, CorrespondWith<RuntimeInfo> {
private String name;
@@ -104,6 +102,6 @@ public class Index extends CacheElement
if (StringUtils.isBlank(regionName)) {
return "/indexes";
}
- return RegionConfig.REGION_CONFIG_ENDPOINT + "/" + regionName + "/indexes";
+ return Region.REGION_CONFIG_ENDPOINT + "/" + regionName + "/indexes";
}
}
diff --git a/geode-management/src/main/java/org/apache/geode/management/configuration/MemberConfig.java b/geode-management/src/main/java/org/apache/geode/management/configuration/MemberConfig.java
index dbe6085..569cfdb 100644
--- a/geode-management/src/main/java/org/apache/geode/management/configuration/MemberConfig.java
+++ b/geode-management/src/main/java/org/apache/geode/management/configuration/MemberConfig.java
@@ -17,13 +17,12 @@ package org.apache.geode.management.configuration;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.management.api.CorrespondWith;
import org.apache.geode.management.api.RestfulEndpoint;
import org.apache.geode.management.runtime.MemberInformation;
@Experimental
-public class MemberConfig extends CacheElement implements RestfulEndpoint,
+public class MemberConfig extends AbstractConfiguration implements RestfulEndpoint,
CorrespondWith<MemberInformation> {
public static final String MEMBER_CONFIG_ENDPOINT = "/members";
diff --git a/geode-management/src/main/java/org/apache/geode/management/configuration/Pdx.java b/geode-management/src/main/java/org/apache/geode/management/configuration/Pdx.java
index 39e26ec..5655fcb 100644
--- a/geode-management/src/main/java/org/apache/geode/management/configuration/Pdx.java
+++ b/geode-management/src/main/java/org/apache/geode/management/configuration/Pdx.java
@@ -19,7 +19,6 @@ package org.apache.geode.management.configuration;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.management.api.CorrespondWith;
import org.apache.geode.management.api.RestfulEndpoint;
import org.apache.geode.management.runtime.RuntimeInfo;
@@ -28,7 +27,8 @@ import org.apache.geode.management.runtime.RuntimeInfo;
* Configuration Objects for Pdx in the cache
*/
@Experimental
-public class Pdx extends CacheElement implements RestfulEndpoint, CorrespondWith<RuntimeInfo> {
+public class Pdx extends AbstractConfiguration
+ implements RestfulEndpoint, CorrespondWith<RuntimeInfo> {
public static final String PDX_ID = "PDX";
public static final String PDX_ENDPOINT = "/configurations/pdx";
diff --git a/geode-management/src/main/java/org/apache/geode/management/configuration/Region.java b/geode-management/src/main/java/org/apache/geode/management/configuration/Region.java
index c5da2cd..57eb1ec 100644
--- a/geode-management/src/main/java/org/apache/geode/management/configuration/Region.java
+++ b/geode-management/src/main/java/org/apache/geode/management/configuration/Region.java
@@ -19,8 +19,6 @@ import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import org.apache.geode.cache.configuration.CacheElement;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.CorrespondWith;
import org.apache.geode.management.api.RestfulEndpoint;
import org.apache.geode.management.runtime.RuntimeRegionInfo;
@@ -31,7 +29,7 @@ import org.apache.geode.management.runtime.RuntimeRegionInfo;
* for regions created using gfsh but listed using management rest api, the attributes not supported
* by management rest api won't be shown.
*/
-public class Region extends CacheElement implements RestfulEndpoint,
+public class Region extends AbstractConfiguration implements RestfulEndpoint,
CorrespondWith<RuntimeRegionInfo> {
public static final String REGION_CONFIG_ENDPOINT = "/regions";
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionType.java b/geode-management/src/main/java/org/apache/geode/management/configuration/RegionType.java
similarity index 98%
rename from geode-management/src/main/java/org/apache/geode/cache/configuration/RegionType.java
rename to geode-management/src/main/java/org/apache/geode/management/configuration/RegionType.java
index 5df4348..5b0f080 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionType.java
+++ b/geode-management/src/main/java/org/apache/geode/management/configuration/RegionType.java
@@ -13,7 +13,7 @@
* the License.
*/
-package org.apache.geode.cache.configuration;
+package org.apache.geode.management.configuration;
import org.apache.geode.annotations.Experimental;
diff --git a/geode-management/src/main/java/org/apache/geode/management/internal/ClientClusterManagementService.java b/geode-management/src/main/java/org/apache/geode/management/internal/ClientClusterManagementService.java
index 27d7df3..a2bb921 100644
--- a/geode-management/src/main/java/org/apache/geode/management/internal/ClientClusterManagementService.java
+++ b/geode-management/src/main/java/org/apache/geode/management/internal/ClientClusterManagementService.java
@@ -26,7 +26,6 @@ import org.apache.commons.lang3.NotImplementedException;
import org.springframework.http.HttpMethod;
import org.springframework.web.client.RestTemplate;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.management.api.ClusterManagementException;
import org.apache.geode.management.api.ClusterManagementListOperationsResult;
import org.apache.geode.management.api.ClusterManagementListResult;
@@ -37,6 +36,7 @@ import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.api.CorrespondWith;
import org.apache.geode.management.api.RestfulEndpoint;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.runtime.OperationResult;
import org.apache.geode.management.runtime.RuntimeInfo;
@@ -70,7 +70,7 @@ public class ClientClusterManagementService implements ClusterManagementService
@Override
@SuppressWarnings("unchecked")
- public <T extends CacheElement> ClusterManagementRealizationResult create(T config) {
+ public <T extends AbstractConfiguration> ClusterManagementRealizationResult create(T config) {
String endPoint = getEndpoint(config);
// the response status code info is represented by the ClusterManagementResult.errorCode already
return assertSuccessful(restTemplate
@@ -80,7 +80,7 @@ public class ClientClusterManagementService implements ClusterManagementService
@Override
@SuppressWarnings("unchecked")
- public <T extends CacheElement> ClusterManagementRealizationResult delete(
+ public <T extends AbstractConfiguration> ClusterManagementRealizationResult delete(
T config) {
String uri = getIdentityEndPoint(config);
return assertSuccessful(restTemplate
@@ -93,14 +93,14 @@ public class ClientClusterManagementService implements ClusterManagementService
}
@Override
- public <T extends CacheElement> ClusterManagementRealizationResult update(
+ public <T extends AbstractConfiguration> ClusterManagementRealizationResult update(
T config) {
throw new NotImplementedException("Not Implemented");
}
@Override
@SuppressWarnings("unchecked")
- public <T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> list(
+ public <T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> list(
T config) {
String endPoint = getEndpoint(config);
return assertSuccessful(restTemplate
@@ -111,7 +111,7 @@ public class ClientClusterManagementService implements ClusterManagementService
@Override
@SuppressWarnings("unchecked")
- public <T extends CacheElement & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> get(
+ public <T extends AbstractConfiguration & CorrespondWith<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> get(
T config) {
return assertSuccessful(restTemplate
.getForEntity(getIdentityEndPoint(config), ClusterManagementListResult.class)
@@ -169,7 +169,7 @@ public class ClientClusterManagementService implements ClusterManagementService
return s;
}
- private String getEndpoint(CacheElement config) {
+ private String getEndpoint(AbstractConfiguration config) {
checkIsRestful(config);
String endpoint = ((RestfulEndpoint) config).getEndpoint();
if (endpoint == null) {
@@ -179,7 +179,7 @@ public class ClientClusterManagementService implements ClusterManagementService
return RestfulEndpoint.URI_VERSION + endpoint;
}
- private String getIdentityEndPoint(CacheElement config) {
+ private String getIdentityEndPoint(AbstractConfiguration config) {
checkIsRestful(config);
String uri = ((RestfulEndpoint) config).getIdentityEndPoint();
if (uri == null) {
@@ -189,7 +189,7 @@ public class ClientClusterManagementService implements ClusterManagementService
return RestfulEndpoint.URI_VERSION + uri;
}
- private void checkIsRestful(CacheElement config) {
+ private void checkIsRestful(AbstractConfiguration config) {
if (!(config instanceof RestfulEndpoint)) {
throw new IllegalArgumentException(
String.format("The config type %s does not have a RESTful endpoint defined",
diff --git a/geode-management/src/test/java/org/apache/geode/cache/configuration/CacheElementTest.java b/geode-management/src/test/java/org/apache/geode/cache/configuration/AbstractConfigurationTest.java
similarity index 95%
rename from geode-management/src/test/java/org/apache/geode/cache/configuration/CacheElementTest.java
rename to geode-management/src/test/java/org/apache/geode/cache/configuration/AbstractConfigurationTest.java
index d1a569e..0055f31 100644
--- a/geode-management/src/test/java/org/apache/geode/cache/configuration/CacheElementTest.java
+++ b/geode-management/src/test/java/org/apache/geode/cache/configuration/AbstractConfigurationTest.java
@@ -22,12 +22,13 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.apache.geode.management.configuration.AbstractConfiguration;
import org.apache.geode.management.configuration.Region;
import org.apache.geode.util.internal.GeodeJsonMapper;
-public class CacheElementTest {
+public class AbstractConfigurationTest {
- private CacheElement element;
+ private AbstractConfiguration element;
private Region runtime;
private static ObjectMapper mapper;
diff --git a/geode-management/src/test/java/org/apache/geode/cache/configuration/CacheElementJsonMappingTest.java b/geode-management/src/test/java/org/apache/geode/cache/configuration/ConfigurationJsonMappingTest.java
similarity index 97%
rename from geode-management/src/test/java/org/apache/geode/cache/configuration/CacheElementJsonMappingTest.java
rename to geode-management/src/test/java/org/apache/geode/cache/configuration/ConfigurationJsonMappingTest.java
index 0c58195..531e8a3 100644
--- a/geode-management/src/test/java/org/apache/geode/cache/configuration/CacheElementJsonMappingTest.java
+++ b/geode-management/src/test/java/org/apache/geode/cache/configuration/ConfigurationJsonMappingTest.java
@@ -26,7 +26,7 @@ import org.apache.geode.management.runtime.MemberInformation;
import org.apache.geode.management.runtime.RuntimeRegionInfo;
import org.apache.geode.util.internal.GeodeJsonMapper;
-public class CacheElementJsonMappingTest {
+public class ConfigurationJsonMappingTest {
private static ObjectMapper mapper = GeodeJsonMapper.getMapper();
private static MemberInformation member;
@@ -81,7 +81,7 @@ public class CacheElementJsonMappingTest {
@Test
public void deserializeWithoutTypeInfo() throws Exception {
String json = "{'name':'test'}";
- RegionConfig config = mapper.readValue(json, RegionConfig.class);
+ Region config = mapper.readValue(json, Region.class);
assertThat(config.getName()).isEqualTo("test");
}
diff --git a/geode-management/src/test/java/org/apache/geode/management/configuration/RegionTest.java b/geode-management/src/test/java/org/apache/geode/management/configuration/RegionTest.java
index 6e35fe1..049c884 100644
--- a/geode-management/src/test/java/org/apache/geode/management/configuration/RegionTest.java
+++ b/geode-management/src/test/java/org/apache/geode/management/configuration/RegionTest.java
@@ -22,7 +22,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;
import org.junit.Test;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.RestfulEndpoint;
import org.apache.geode.management.runtime.RuntimeRegionInfo;
import org.apache.geode.util.internal.GeodeJsonMapper;
diff --git a/geode-wan/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java b/geode-wan/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
index eae2319..f0b08b8 100644
--- a/geode-wan/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
+++ b/geode-wan/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
@@ -14,6 +14,7 @@
*/
package org.apache.geode.management.internal.cli.commands;
+import static org.apache.geode.lang.Identifiable.find;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Before;
@@ -24,7 +25,6 @@ import org.junit.rules.TemporaryFolder;
import org.junit.rules.TestName;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionConfig;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.test.dunit.IgnoredException;
@@ -89,7 +89,7 @@ public class AlterRegionCommandDUnitTest {
CacheConfig config =
internalLocator.getConfigurationPersistenceService().getCacheConfig("cluster");
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), regionName);
+ RegionConfig regionConfig = find(config.getRegions(), regionName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getRegionAttributes()).isNotNull();
assertThat(regionConfig.getRegionAttributes().getAsyncEventQueueIds()).isNotEmpty()
@@ -140,13 +140,13 @@ public class AlterRegionCommandDUnitTest {
CacheConfig config =
internalLocator.getConfigurationPersistenceService().getCacheConfig("cluster");
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), region1Name);
+ RegionConfig regionConfig = find(config.getRegions(), region1Name);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getRegionAttributes()).isNotNull();
assertThat(regionConfig.getRegionAttributes().getAsyncEventQueueIds())
.isEqualTo(asyncEventQueue);
- RegionConfig region2Config = CacheElement.findElement(config.getRegions(), region2Name);
+ RegionConfig region2Config = find(config.getRegions(), region2Name);
assertThat(region2Config).isNotNull();
assertThat(region2Config.getRegionAttributes()).isNotNull();
assertThat(region2Config.getRegionAttributes().getAsyncEventQueueIds()).isBlank();
@@ -196,7 +196,7 @@ public class AlterRegionCommandDUnitTest {
CacheConfig config =
internalLocator.getConfigurationPersistenceService().getCacheConfig("cluster");
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), regionName);
+ RegionConfig regionConfig = find(config.getRegions(), regionName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getRegionAttributes()).isNotNull();
assertThat(regionConfig.getRegionAttributes().getAsyncEventQueueIds()).isBlank();
@@ -231,7 +231,7 @@ public class AlterRegionCommandDUnitTest {
CacheConfig config =
internalLocator.getConfigurationPersistenceService().getCacheConfig("cluster");
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), regionName);
+ RegionConfig regionConfig = find(config.getRegions(), regionName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getRegionAttributes()).isNotNull();
assertThat(regionConfig.getRegionAttributes().getGatewaySenderIds()).isNotEmpty()
@@ -283,13 +283,13 @@ public class AlterRegionCommandDUnitTest {
CacheConfig config =
internalLocator.getConfigurationPersistenceService().getCacheConfig("cluster");
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), region1Name);
+ RegionConfig regionConfig = find(config.getRegions(), region1Name);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getRegionAttributes()).isNotNull();
assertThat(regionConfig.getRegionAttributes().getGatewaySenderIds())
.isEqualTo(gatewaySenderName);
- RegionConfig region2Config = CacheElement.findElement(config.getRegions(), region2Name);
+ RegionConfig region2Config = find(config.getRegions(), region2Name);
assertThat(region2Config).isNotNull();
assertThat(region2Config.getRegionAttributes()).isNotNull();
assertThat(region2Config.getRegionAttributes().getGatewaySenderIds()).isBlank();
@@ -337,7 +337,7 @@ public class AlterRegionCommandDUnitTest {
CacheConfig config =
internalLocator.getConfigurationPersistenceService().getCacheConfig("cluster");
- RegionConfig regionConfig = CacheElement.findElement(config.getRegions(), regionName);
+ RegionConfig regionConfig = find(config.getRegions(), regionName);
assertThat(regionConfig).isNotNull();
assertThat(regionConfig.getRegionAttributes()).isNotNull();
assertThat(regionConfig.getRegionAttributes().getGatewaySenderIds()).isBlank();
diff --git a/geode-web-management/src/distributedTest/java/org/apache/geode/management/client/ClientClusterManagementServiceDUnitTest.java b/geode-web-management/src/distributedTest/java/org/apache/geode/management/client/ClientClusterManagementServiceDUnitTest.java
index 55c9016..0775d35 100644
--- a/geode-web-management/src/distributedTest/java/org/apache/geode/management/client/ClientClusterManagementServiceDUnitTest.java
+++ b/geode-web-management/src/distributedTest/java/org/apache/geode/management/client/ClientClusterManagementServiceDUnitTest.java
@@ -34,13 +34,13 @@ import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.context.WebApplicationContext;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementListResult;
import org.apache.geode.management.api.ClusterManagementRealizationResult;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.api.RealizationResult;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.internal.rest.LocatorWebContext;
import org.apache.geode.management.internal.rest.PlainLocatorContextLoader;
import org.apache.geode.management.runtime.RuntimeRegionInfo;
diff --git a/geode-web-management/src/integrationTest/java/org/apache/geode/management/internal/rest/ClusterManagementSecurityRestIntegrationTest.java b/geode-web-management/src/integrationTest/java/org/apache/geode/management/internal/rest/ClusterManagementSecurityRestIntegrationTest.java
index a6444f9..4b074a0 100644
--- a/geode-web-management/src/integrationTest/java/org/apache/geode/management/internal/rest/ClusterManagementSecurityRestIntegrationTest.java
+++ b/geode-web-management/src/integrationTest/java/org/apache/geode/management/internal/rest/ClusterManagementSecurityRestIntegrationTest.java
@@ -42,7 +42,7 @@ import org.springframework.web.context.WebApplicationContext;
import org.apache.geode.cache.configuration.GatewayReceiverConfig;
import org.apache.geode.cache.configuration.PdxType;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.cache.configuration.RegionType;
+import org.apache.geode.management.configuration.RegionType;
import org.apache.geode.management.operation.RebalanceOperation;
import org.apache.geode.util.internal.GeodeJsonMapper;
diff --git a/geode-web-management/src/integrationTest/java/org/apache/geode/management/internal/rest/RegionManagementIntegrationTest.java b/geode-web-management/src/integrationTest/java/org/apache/geode/management/internal/rest/RegionManagementIntegrationTest.java
index bde60b3..3f2098d 100644
--- a/geode-web-management/src/integrationTest/java/org/apache/geode/management/internal/rest/RegionManagementIntegrationTest.java
+++ b/geode-web-management/src/integrationTest/java/org/apache/geode/management/internal/rest/RegionManagementIntegrationTest.java
@@ -30,11 +30,11 @@ import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.context.WebApplicationContext;
-import org.apache.geode.cache.configuration.RegionType;
import org.apache.geode.management.api.ClusterManagementResult;
import org.apache.geode.management.api.ClusterManagementService;
import org.apache.geode.management.client.ClusterManagementServiceBuilder;
import org.apache.geode.management.configuration.Region;
+import org.apache.geode.management.configuration.RegionType;
@RunWith(SpringRunner.class)
@ContextConfiguration(locations = {"classpath*:WEB-INF/management-servlet.xml"},
diff --git a/geode-web-management/src/main/java/org/apache/geode/management/internal/rest/controllers/RegionManagementController.java b/geode-web-management/src/main/java/org/apache/geode/management/internal/rest/controllers/RegionManagementController.java
index 0f6e751..66a0c90 100644
--- a/geode-web-management/src/main/java/org/apache/geode/management/internal/rest/controllers/RegionManagementController.java
+++ b/geode-web-management/src/main/java/org/apache/geode/management/internal/rest/controllers/RegionManagementController.java
@@ -15,7 +15,7 @@
package org.apache.geode.management.internal.rest.controllers;
-import static org.apache.geode.cache.configuration.RegionConfig.REGION_CONFIG_ENDPOINT;
+import static org.apache.geode.management.configuration.Region.REGION_CONFIG_ENDPOINT;
import static org.apache.geode.management.internal.rest.controllers.AbstractManagementController.MANAGEMENT_API_VERSION;
import java.util.List;