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 2018/05/01 21:39:36 UTC
[geode] branch develop updated: GEODE-5143: rename
ClusterConfigurationService to ConfigurationPersistenceService (#1869)
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 9ff634a GEODE-5143: rename ClusterConfigurationService to ConfigurationPersistenceService (#1869)
9ff634a is described below
commit 9ff634a1885cbef3bc7cef2cc0b76d61cb4d7e72
Author: jinmeiliao <ji...@pivotal.io>
AuthorDate: Tue May 1 14:39:31 2018 -0700
GEODE-5143: rename ClusterConfigurationService to ConfigurationPersistenceService (#1869)
---
.../jdbc/internal/cli/AlterConnectionCommand.java | 6 ++--
.../jdbc/internal/cli/AlterMappingCommand.java | 6 ++--
.../internal/cli/DescribeConnectionCommand.java | 4 +--
.../jdbc/internal/cli/DescribeMappingCommand.java | 4 +--
.../jdbc/internal/cli/ListConnectionCommand.java | 6 ++--
.../jdbc/internal/cli/ListMappingCommand.java | 6 ++--
.../cli/AlterConnectionCommandDUnitTest.java | 8 ++---
.../internal/cli/AlterConnectionCommandTest.java | 12 +++----
.../internal/cli/AlterMappingCommandDUnitTest.java | 8 ++---
.../jdbc/internal/cli/AlterMappingCommandTest.java | 12 +++----
.../cli/CreateConnectionCommandDUnitTest.java | 8 ++---
.../cli/CreateMappingCommandDUnitTest.java | 12 +++----
.../cli/DescribeConnectionCommandTest.java | 22 ++++++------
.../internal/cli/DescribeMappingCommandTest.java | 22 ++++++------
.../cli/DestroyConnectionCommandDUnitTest.java | 4 +--
.../cli/DestroyMappingCommandDunitTest.java | 4 +--
.../internal/cli/ListConnectionCommandTest.java | 24 ++++++-------
.../jdbc/internal/cli/ListMappingCommandTest.java | 24 ++++++-------
...e.java => ConfigurationPersistenceService.java} | 2 +-
.../internal/AbstractDistributionConfig.java | 2 +-
...> InternalConfigurationPersistenceService.java} | 28 +++++++--------
.../distributed/internal/InternalLocator.java | 31 ++++++++--------
.../geode/distributed/internal/ServerLocator.java | 2 +-
.../membership/gms/locator/GMSLocator.java | 4 +--
.../distributed/internal/tcpserver/TcpHandler.java | 4 +--
.../distributed/internal/tcpserver/TcpServer.java | 4 +--
.../internal/cache/ClusterConfigurationLoader.java | 6 ++--
.../geode/internal/cache/GemFireCacheImpl.java | 4 +--
.../apache/geode/management/cli/GfshCommand.java | 6 ++--
.../management/internal/JmxManagerLocator.java | 4 +--
.../cli/commands/AlterAsyncEventQueueCommand.java | 6 ++--
.../internal/cli/commands/AlterRegionCommand.java | 4 +--
.../cli/commands/AlterRuntimeConfigCommand.java | 4 +--
.../internal/cli/commands/ConfigurePDXCommand.java | 8 ++---
.../cli/commands/CreateAsyncEventQueueCommand.java | 4 +--
.../cli/commands/CreateDefinedIndexesCommand.java | 4 +--
.../cli/commands/CreateDiskStoreCommand.java | 4 +--
.../cli/commands/CreateGatewayReceiverCommand.java | 8 ++---
.../cli/commands/CreateGatewaySenderCommand.java | 8 ++---
.../cli/commands/CreateJndiBindingCommand.java | 6 ++--
.../internal/cli/commands/CreateRegionCommand.java | 4 +--
.../internal/cli/commands/DeployCommand.java | 6 ++--
.../cli/commands/DescribeJndiBindingCommand.java | 6 ++--
.../commands/DestroyAsyncEventQueueCommand.java | 4 +--
.../cli/commands/DestroyDiskStoreCommand.java | 4 +--
.../commands/DestroyGatewayReceiverCommand.java | 6 ++--
.../cli/commands/DestroyGatewaySenderCommand.java | 8 ++---
.../internal/cli/commands/DestroyIndexCommand.java | 4 +--
.../cli/commands/DestroyJndiBindingCommand.java | 6 ++--
.../cli/commands/DestroyRegionCommand.java | 4 +--
.../ExportImportClusterConfigurationCommands.java | 8 ++---
.../internal/cli/commands/InternalGfshCommand.java | 2 +-
.../cli/commands/ListJndiBindingCommand.java | 6 ++--
.../internal/cli/commands/UndeployCommand.java | 6 ++--
.../management/internal/cli/i18n/CliStrings.java | 5 +--
.../internal/cli/remote/CommandExecutor.java | 4 +--
.../callbacks/ConfigurationChangeListener.java | 6 ++--
.../functions/DownloadJarFunction.java | 5 +--
.../functions/GetClusterConfigurationFunction.java | 6 ++--
.../SharedConfigurationStatusRequestHandler.java | 4 +--
.../AutoConnectionSourceImplJUnitTest.java | 4 +--
.../LocatorLauncherIntegrationTestCase.java | 2 +-
...DUnitTest.java => CacheConfigDAODUnitTest.java} | 8 ++---
...ternalConfigurationPersistenceServiceTest.java} | 8 ++---
.../internal/tcpserver/TcpServerJUnitTest.java | 6 ++--
.../extension/mock/MockExtensionCommands.java | 6 ++--
.../commands/AlterAsyncEventQueueCommandTest.java | 10 +++---
.../cli/commands/AlterCompressorDUnitTest.java | 10 +++---
.../ConfigurePDXCommandIntegrationTest.java | 10 +++---
.../cli/commands/ConfigurePDXCommandTest.java | 10 +++---
.../CreateAlterDestroyRegionCommandsDUnitTest.java | 10 +++---
.../CreateAsyncEventQueueCommandDUnitTest.java | 10 +++---
.../commands/CreateAsyncEventQueueCommandTest.java | 10 +++---
.../CreateDefinedIndexesCommandDUnitTest.java | 10 +++---
.../commands/CreateDefinedIndexesCommandTest.java | 20 +++++------
.../commands/CreateGatewayReceiverCommandTest.java | 14 ++++----
.../commands/CreateGatewaySenderCommandTest.java | 14 ++++----
.../cli/commands/CreateIndexCommandDUnitTest.java | 26 +++++++-------
.../CreateJndiBindingCommandDUnitTest.java | 6 ++--
.../cli/commands/CreateJndiBindingCommandTest.java | 42 +++++++++++-----------
.../DestroyAsyncEventQueueCommandDUnitTest.java | 26 +++++++-------
.../DestroyAsyncEventQueueCommandTest.java | 4 +--
.../DestroyGatewayReceiverCommandTest.java | 8 ++---
.../commands/DestroyGatewaySenderCommandTest.java | 14 ++++----
.../DestroyJndiBindingCommandDUnitTest.java | 6 ++--
.../commands/DestroyJndiBindingCommandTest.java | 12 +++----
.../commands/DestroyRegionCommandDUnitTest.java | 18 +++++-----
.../cli/commands/DestroyRegionCommandTest.java | 8 ++---
.../cli/commands/DiskStoreCommandsDUnitTest.java | 6 ++--
.../cli/commands/GfshCommandJUnitTest.java | 10 +++---
.../IndexCommandsShareConfigurationDUnitTest.java | 10 +++---
.../cli/commands/ListJndiBindingCommandTest.java | 12 +++----
.../internal/configuration/ClusterConfig.java | 5 +--
.../ClusterConfigWithSecurityDUnitTest.java | 6 ++--
...rationPersistenceServiceUsingDirDUnitTest.java} | 11 +++---
.../SharedConfigurationTestUtils.java | 5 +--
.../GetClusterConfigurationFunctionTest.java | 10 +++---
.../utils/XmlUtilsAddNewNodeJUnitTest.java | 5 +--
.../dunit/internal/JUnit4DistributedTestCase.java | 2 +-
.../internal/configuration/cluster-region.xml | 2 +-
.../lucene/internal/cli/LuceneIndexCommands.java | 10 +++---
.../LuceneClusterConfigurationDUnitTest.java | 9 ++---
...CreateDestroyGatewaySenderCommandDUnitTest.java | 4 +--
.../DestroyGatewayReceiverCommandDUnitTest.java | 6 ++--
.../cli/commands/AlterRuntimeCommandDUnitTest.java | 6 ++--
105 files changed, 455 insertions(+), 445 deletions(-)
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommand.java
index 3b5128a..1ffed60 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommand.java
@@ -14,7 +14,7 @@
*/
package org.apache.geode.connectors.jdbc.internal.cli;
-import static org.apache.geode.distributed.ClusterConfigurationService.CLUSTER_CONFIG;
+import static org.apache.geode.distributed.ConfigurationPersistenceService.CLUSTER_CONFIG;
import java.util.List;
import java.util.Set;
@@ -25,7 +25,7 @@ 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.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.Result;
@@ -77,7 +77,7 @@ public class AlterConnectionCommand extends SingleGfshCommand {
ConnectorService.Connection newConnection =
new ConnectorService.Connection(name, url, user, password, params);
- ClusterConfigurationService ccService = getConfigurationService();
+ ConfigurationPersistenceService ccService = getConfigurationPersistenceService();
// if cc is running, you can only alter connection available in cc service.
if (ccService != null) {
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommand.java
index ccf8a15..f1c8a31 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommand.java
@@ -14,7 +14,7 @@
*/
package org.apache.geode.connectors.jdbc.internal.cli;
-import static org.apache.geode.distributed.ClusterConfigurationService.CLUSTER_CONFIG;
+import static org.apache.geode.distributed.ConfigurationPersistenceService.CLUSTER_CONFIG;
import java.util.List;
import java.util.Set;
@@ -25,7 +25,7 @@ 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.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.Result;
@@ -84,7 +84,7 @@ public class AlterMappingCommand extends SingleGfshCommand {
pdxClassName, table, connectionName, keyInValue);
newMapping.setFieldMapping(fieldMappings);
- ClusterConfigurationService ccService = getConfigurationService();
+ ConfigurationPersistenceService ccService = getConfigurationPersistenceService();
// if cc is running, you can only alter connection available in cc service.
if (ccService != null) {
// search for the connection that has this id to see if it exists
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeConnectionCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeConnectionCommand.java
index 267dcc0..154b51b 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeConnectionCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeConnectionCommand.java
@@ -30,7 +30,7 @@ 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.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.cli.CliMetaData;
@@ -64,7 +64,7 @@ public class DescribeConnectionCommand extends GfshCommand {
ConnectorService.Connection connection = null;
// check if CC is available and use it to describe the connection
- ClusterConfigurationService ccService = getConfigurationService();
+ ConfigurationPersistenceService ccService = getConfigurationPersistenceService();
if (ccService != null) {
CacheConfig cacheConfig = ccService.getCacheConfig("cluster");
if (cacheConfig != null) {
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommand.java
index e73caa4..2113b7b 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommand.java
@@ -29,7 +29,7 @@ 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.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.GfshCommand;
@@ -61,7 +61,7 @@ public class DescribeMappingCommand extends GfshCommand {
ConnectorService.RegionMapping mapping = null;
// check if CC is available and use it to describe the connection
- ClusterConfigurationService ccService = getConfigurationService();
+ ConfigurationPersistenceService ccService = getConfigurationPersistenceService();
if (ccService != null) {
CacheConfig cacheConfig = ccService.getCacheConfig("cluster");
if (cacheConfig != null) {
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommand.java
index a9c64ad..4b79a02 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommand.java
@@ -14,7 +14,7 @@
*/
package org.apache.geode.connectors.jdbc.internal.cli;
-import static org.apache.geode.distributed.ClusterConfigurationService.CLUSTER_CONFIG;
+import static org.apache.geode.distributed.ConfigurationPersistenceService.CLUSTER_CONFIG;
import java.util.Collection;
import java.util.List;
@@ -24,7 +24,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.GfshCommand;
@@ -52,7 +52,7 @@ public class ListConnectionCommand extends GfshCommand {
Collection<ConnectorService.Connection> connections = null;
// check if CC is available and use it to describe the connection
- ClusterConfigurationService ccService = getConfigurationService();
+ ConfigurationPersistenceService ccService = getConfigurationPersistenceService();
if (ccService != null) {
CacheConfig cacheConfig = ccService.getCacheConfig(CLUSTER_CONFIG);
if (cacheConfig != null) {
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommand.java
index 70e0b8a..e31c6dc 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommand.java
@@ -14,7 +14,7 @@
*/
package org.apache.geode.connectors.jdbc.internal.cli;
-import static org.apache.geode.distributed.ClusterConfigurationService.CLUSTER_CONFIG;
+import static org.apache.geode.distributed.ConfigurationPersistenceService.CLUSTER_CONFIG;
import java.util.Collection;
import java.util.List;
@@ -24,7 +24,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.GfshCommand;
@@ -53,7 +53,7 @@ public class ListMappingCommand extends GfshCommand {
Collection<ConnectorService.RegionMapping> mappings = null;
// check if CC is available and use it to describe the connection
- ClusterConfigurationService ccService = getConfigurationService();
+ ConfigurationPersistenceService ccService = getConfigurationPersistenceService();
if (ccService != null) {
CacheConfig cacheConfig = ccService.getCacheConfig(CLUSTER_CONFIG);
if (cacheConfig != null) {
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommandDUnitTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommandDUnitTest.java
index b9668ec..975a26f 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommandDUnitTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommandDUnitTest.java
@@ -87,8 +87,8 @@ public class AlterConnectionCommandDUnitTest {
gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).isNotNull().contains("jdbc:connector-service");
});
@@ -116,8 +116,8 @@ public class AlterConnectionCommandDUnitTest {
gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).isNotNull().contains("jdbc:connector-service");
});
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommandTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommandTest.java
index 80c96af..a9bf9b3 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommandTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterConnectionCommandTest.java
@@ -34,8 +34,8 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.internal.cli.GfshParseResult;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
import org.apache.geode.test.junit.categories.UnitTest;
@@ -47,7 +47,7 @@ public class AlterConnectionCommandTest {
private AlterConnectionCommand command;
private List<CliFunctionResult> results;
private CliFunctionResult result;
- private ClusterConfigurationService ccService;
+ private ConfigurationPersistenceService ccService;
private ConnectorService.Connection connection;
private List<ConnectorService.Connection> connections;
private ConnectorService connectorService;
@@ -66,10 +66,10 @@ public class AlterConnectionCommandTest {
when(result.isSuccessful()).thenReturn(true);
when(result.getMemberIdOrName()).thenReturn("memberName");
when(result.getStatus()).thenReturn("message");
- ccService = mock(InternalClusterConfigurationService.class);
+ ccService = mock(InternalConfigurationPersistenceService.class);
cacheConfig = mock(CacheConfig.class);
when(ccService.getCacheConfig("cluster")).thenReturn(cacheConfig);
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
connectorService = mock(ConnectorService.class);
connections = new ArrayList<>();
connection = new ConnectorService.Connection();
@@ -102,7 +102,7 @@ public class AlterConnectionCommandTest {
@Test
public void whenCCServiceIsNotAvailable() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
results.add(result);
gfsh.executeAndAssertThat(command, COMMAND).statusIsSuccess();
verify(command).executeAndGetFunctionResult(any(), any(), any());
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommandDUnitTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommandDUnitTest.java
index 9a5c65f..5550724 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommandDUnitTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommandDUnitTest.java
@@ -93,8 +93,8 @@ public class AlterMappingCommandDUnitTest {
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).isNotNull().contains("jdbc:connector-service");
});
@@ -126,8 +126,8 @@ public class AlterMappingCommandDUnitTest {
gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).isNotNull().contains("jdbc:connector-service");
});
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommandTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommandTest.java
index e83d3d1..539db0e 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommandTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/AlterMappingCommandTest.java
@@ -34,8 +34,8 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.internal.cli.GfshParseResult;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
import org.apache.geode.test.junit.categories.UnitTest;
@@ -47,7 +47,7 @@ public class AlterMappingCommandTest {
private AlterMappingCommand command;
private List<CliFunctionResult> results;
private CliFunctionResult result;
- private ClusterConfigurationService ccService;
+ private ConfigurationPersistenceService ccService;
private ConnectorService.RegionMapping mapping;
private List<ConnectorService.RegionMapping> mappings;
private ConnectorService connectorService;
@@ -66,8 +66,8 @@ public class AlterMappingCommandTest {
when(result.isSuccessful()).thenReturn(true);
when(result.getMemberIdOrName()).thenReturn("memberName");
when(result.getStatus()).thenReturn("message");
- ccService = mock(InternalClusterConfigurationService.class);
- doReturn(ccService).when(command).getConfigurationService();
+ ccService = mock(InternalConfigurationPersistenceService.class);
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
cacheConfig = mock(CacheConfig.class);
when(ccService.getCacheConfig("cluster")).thenReturn(cacheConfig);
connectorService = mock(ConnectorService.class);
@@ -109,7 +109,7 @@ public class AlterMappingCommandTest {
@Test
public void whenCCServiceIsNotAvailable() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
results.add(result);
gfsh.executeAndAssertThat(command, COMMAND).statusIsSuccess();
verify(command).executeAndGetFunctionResult(any(), any(), any());
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateConnectionCommandDUnitTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateConnectionCommandDUnitTest.java
index f50d175..2c16396 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateConnectionCommandDUnitTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateConnectionCommandDUnitTest.java
@@ -73,8 +73,8 @@ public class CreateConnectionCommandDUnitTest {
gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).isNotNull().contains("jdbc:connector-service");
});
@@ -101,8 +101,8 @@ public class CreateConnectionCommandDUnitTest {
gfsh.executeAndAssertThat(csb.toString()).statusIsError();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).isNull();
});
}
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java
index 16b9af7..c1747a8 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java
@@ -77,8 +77,8 @@ public class CreateMappingCommandDUnitTest {
gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).isNotNull().contains("jdbc:connector-service")
.doesNotContain("jdbc:connection").contains("jdbc:region-mapping")
.contains("jdbc:field-mapping");
@@ -113,8 +113,8 @@ public class CreateMappingCommandDUnitTest {
gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).isNotNull().contains("primary-key-in-value=\"false\"");
});
@@ -147,8 +147,8 @@ public class CreateMappingCommandDUnitTest {
gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).isNotNull().contains("jdbc:connector-service");
assertThat(xml).isNotNull().contains("jdbc:region-mapping");
assertThat(xml).isNotNull().doesNotContain("jdbc:field-mapping");
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeConnectionCommandTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeConnectionCommandTest.java
index 24d2bf5..aa5b358 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeConnectionCommandTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeConnectionCommandTest.java
@@ -32,9 +32,9 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.test.junit.categories.UnitTest;
import org.apache.geode.test.junit.rules.GfshParserRule;
@@ -42,7 +42,7 @@ import org.apache.geode.test.junit.rules.GfshParserRule;
public class DescribeConnectionCommandTest {
public static final String COMMAND = "describe jdbc-connection --name=name";
private DescribeConnectionCommand command;
- private ClusterConfigurationService ccService;
+ private ConfigurationPersistenceService ccService;
private CacheConfig cacheConfig;
@ClassRule
@@ -51,8 +51,8 @@ public class DescribeConnectionCommandTest {
@Before
public void setUp() {
command = spy(DescribeConnectionCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
- doReturn(ccService).when(command).getConfigurationService();
+ ccService = mock(InternalConfigurationPersistenceService.class);
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
cacheConfig = mock(CacheConfig.class);
when(ccService.getCacheConfig("cluster")).thenReturn(cacheConfig);
}
@@ -65,14 +65,14 @@ public class DescribeConnectionCommandTest {
@Test
public void whenCCServiceIsRunningAndNoConnectorServiceFound() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
gfsh.executeAndAssertThat(command, COMMAND).statusIsError()
.containsOutput("connection named 'name' not found");
}
@Test
public void whenCCServiceIsRunningAndNoConnectionFound() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
ConnectorService connectorService = mock(ConnectorService.class);
when(cacheConfig.findCustomCacheElement(any(), any())).thenReturn(connectorService);
@@ -82,7 +82,7 @@ public class DescribeConnectionCommandTest {
@Test
public void whenCCIsAvailable() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
// connection found in CC
ConnectorService.Connection connection = new ConnectorService.Connection("name", "url1",
@@ -102,7 +102,7 @@ public class DescribeConnectionCommandTest {
@Test
public void whenCCIsNotAvailableAndNoMemberExists() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.emptySet()).when(command).findMembers(null, null);
doReturn(null).when(command).getMember(any());
@@ -112,7 +112,7 @@ public class DescribeConnectionCommandTest {
@Test
public void whenCCIsNotAvailableAndMemberExists() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(mock(DistributedMember.class))).when(command).findMembers(null,
null);
@@ -130,7 +130,7 @@ public class DescribeConnectionCommandTest {
@Test
public void whenCCIsNotAvailableAndNoConnectionFoundOnMember() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(mock(DistributedMember.class))).when(command).findMembers(null,
null);
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandTest.java
index 578f2ab..74d9dfb 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandTest.java
@@ -32,9 +32,9 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.test.junit.categories.UnitTest;
import org.apache.geode.test.junit.rules.GfshParserRule;
@@ -43,7 +43,7 @@ import org.apache.geode.test.junit.rules.GfshParserRule;
public class DescribeMappingCommandTest {
public static final String COMMAND = "describe jdbc-mapping --region=region ";
private DescribeMappingCommand command;
- private ClusterConfigurationService ccService;
+ private ConfigurationPersistenceService ccService;
private CacheConfig cacheConfig;
@ClassRule
@@ -52,8 +52,8 @@ public class DescribeMappingCommandTest {
@Before
public void setUp() {
command = spy(DescribeMappingCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
- doReturn(ccService).when(command).getConfigurationService();
+ ccService = mock(InternalConfigurationPersistenceService.class);
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
cacheConfig = mock(CacheConfig.class);
when(ccService.getCacheConfig("cluster")).thenReturn(cacheConfig);
}
@@ -66,14 +66,14 @@ public class DescribeMappingCommandTest {
@Test
public void whenCCServiceIsRunningAndNoConnectorServiceFound() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
gfsh.executeAndAssertThat(command, COMMAND).statusIsError()
.containsOutput("mapping for region 'region' not found");
}
@Test
public void whenCCServiceIsRunningAndNoConnectionFound() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
ConnectorService connectorService = mock(ConnectorService.class);
when(cacheConfig.findCustomCacheElement(any(), any())).thenReturn(connectorService);
@@ -83,7 +83,7 @@ public class DescribeMappingCommandTest {
@Test
public void whenCCIsAvailable() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
// mapping found in CC
ConnectorService.RegionMapping mapping =
@@ -108,7 +108,7 @@ public class DescribeMappingCommandTest {
@Test
public void whenCCIsNotAvailableAndNoMemberExists() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.emptySet()).when(command).findMembers(null, null);
gfsh.executeAndAssertThat(command, COMMAND).statusIsError()
@@ -117,7 +117,7 @@ public class DescribeMappingCommandTest {
@Test
public void whenCCIsNotAvailableAndMemberExists() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(mock(DistributedMember.class))).when(command).findMembers(null,
null);
@@ -141,7 +141,7 @@ public class DescribeMappingCommandTest {
@Test
public void whenCCIsNotAvailableAndNoMappingFoundOnMember() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(mock(DistributedMember.class))).when(command).findMembers(null,
null);
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyConnectionCommandDUnitTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyConnectionCommandDUnitTest.java
index c52946c..d43cc70 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyConnectionCommandDUnitTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyConnectionCommandDUnitTest.java
@@ -86,8 +86,8 @@ public class DestroyConnectionCommandDUnitTest implements Serializable {
gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).contains("jdbc:connector-service");
});
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandDunitTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandDunitTest.java
index 9fe5f5f..397c36b 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandDunitTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandDunitTest.java
@@ -89,8 +89,8 @@ public class DestroyMappingCommandDunitTest implements Serializable {
gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
locator.invoke(() -> {
- String xml = InternalLocator.getLocator().getSharedConfiguration().getConfiguration("cluster")
- .getCacheXmlContent();
+ String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
+ .getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).contains("jdbc:connector-service");
});
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandTest.java
index f5dc088..384aaa2 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandTest.java
@@ -32,9 +32,9 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.test.junit.categories.UnitTest;
import org.apache.geode.test.junit.rules.GfshParserRule;
@@ -43,7 +43,7 @@ import org.apache.geode.test.junit.rules.GfshParserRule;
public class ListConnectionCommandTest {
public static final String COMMAND = "list jdbc-connections ";
private ListConnectionCommand command;
- private ClusterConfigurationService ccService;
+ private ConfigurationPersistenceService ccService;
private CacheConfig cacheConfig;
@ClassRule
@@ -52,15 +52,15 @@ public class ListConnectionCommandTest {
@Before
public void setUp() {
command = spy(ListConnectionCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
- doReturn(ccService).when(command).getConfigurationService();
+ ccService = mock(InternalConfigurationPersistenceService.class);
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
cacheConfig = mock(CacheConfig.class);
when(ccService.getCacheConfig("cluster")).thenReturn(cacheConfig);
}
@Test
public void whenCCServiceIsNotAvailable() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.emptySet()).when(command).findMembers(any(), any());
gfsh.executeAndAssertThat(command, COMMAND).statusIsSuccess()
.containsOutput("No connections found");
@@ -68,14 +68,14 @@ public class ListConnectionCommandTest {
@Test
public void whenCCServiceIsRunningAndNoConnectorServiceFound() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
gfsh.executeAndAssertThat(command, COMMAND).statusIsSuccess()
.containsOutput("No connections found");
}
@Test
public void whenCCServiceIsRunningAndNoConnectionFound() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
ConnectorService connectorService = mock(ConnectorService.class);
when(cacheConfig.findCustomCacheElement(any(), any())).thenReturn(connectorService);
@@ -85,7 +85,7 @@ public class ListConnectionCommandTest {
@Test
public void whenCCIsAvailable() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
// connections found in CC
ConnectorService.Connection connection1 = new ConnectorService.Connection("name1", "url1",
@@ -108,7 +108,7 @@ public class ListConnectionCommandTest {
@Test
public void whenCCIsNotAvailableAndNoMemberExists() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.emptySet()).when(command).findMembers(null, null);
gfsh.executeAndAssertThat(command, COMMAND).statusIsSuccess()
@@ -117,7 +117,7 @@ public class ListConnectionCommandTest {
@Test
public void whenCCIsNotAvailableAndMemberExists() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(mock(DistributedMember.class))).when(command).findMembers(null,
null);
@@ -139,7 +139,7 @@ public class ListConnectionCommandTest {
@Test
public void whenCCIsNotAvailableAndNoConnectionFoundOnMember() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(mock(DistributedMember.class))).when(command).findMembers(null,
null);
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandTest.java
index 8421d78..f644ec3 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandTest.java
@@ -32,9 +32,9 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.connectors.jdbc.internal.configuration.ConnectorService;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.test.junit.categories.UnitTest;
import org.apache.geode.test.junit.rules.GfshParserRule;
@@ -43,7 +43,7 @@ import org.apache.geode.test.junit.rules.GfshParserRule;
public class ListMappingCommandTest {
public static final String COMMAND = "list jdbc-mappings";
private ListMappingCommand command;
- private ClusterConfigurationService ccService;
+ private ConfigurationPersistenceService ccService;
private CacheConfig cacheConfig;
@ClassRule
@@ -52,15 +52,15 @@ public class ListMappingCommandTest {
@Before
public void setUp() {
command = spy(ListMappingCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
- doReturn(ccService).when(command).getConfigurationService();
+ ccService = mock(InternalConfigurationPersistenceService.class);
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
cacheConfig = mock(CacheConfig.class);
when(ccService.getCacheConfig("cluster")).thenReturn(cacheConfig);
}
@Test
public void whenCCServiceIsNotAvailable() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.emptySet()).when(command).findMembers(any(), any());
gfsh.executeAndAssertThat(command, COMMAND).statusIsSuccess()
.containsOutput("No mappings found");
@@ -68,14 +68,14 @@ public class ListMappingCommandTest {
@Test
public void whenCCServiceIsRunningAndNoConnectorServiceFound() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
gfsh.executeAndAssertThat(command, COMMAND).statusIsSuccess()
.containsOutput("No mappings found");
}
@Test
public void whenCCServiceIsRunningAndNoConnectionFound() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
ConnectorService connectorService = mock(ConnectorService.class);
when(cacheConfig.findCustomCacheElement(any(), any())).thenReturn(connectorService);
@@ -85,7 +85,7 @@ public class ListMappingCommandTest {
@Test
public void whenCCIsAvailable() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
// mappings found in CC
ConnectorService.RegionMapping mapping1 =
@@ -109,7 +109,7 @@ public class ListMappingCommandTest {
@Test
public void whenCCIsNotAvailableAndNoMemberExists() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.emptySet()).when(command).findMembers(null, null);
gfsh.executeAndAssertThat(command, COMMAND).statusIsSuccess()
@@ -118,7 +118,7 @@ public class ListMappingCommandTest {
@Test
public void whenExistingMemberIsSpecified() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(mock(DistributedMember.class))).when(command).findMembers(null,
null);
@@ -148,7 +148,7 @@ public class ListMappingCommandTest {
@Test
public void whenCCIsNotAvailableAndNoConnectionFoundOnMember() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(mock(DistributedMember.class))).when(command).findMembers(null,
null);
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/ClusterConfigurationService.java b/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationPersistenceService.java
similarity index 96%
rename from geode-core/src/main/java/org/apache/geode/distributed/ClusterConfigurationService.java
rename to geode-core/src/main/java/org/apache/geode/distributed/ConfigurationPersistenceService.java
index 61aeb7d..2cf857b 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/ClusterConfigurationService.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationPersistenceService.java
@@ -23,7 +23,7 @@ import org.apache.geode.annotations.Experimental;
import org.apache.geode.cache.configuration.CacheConfig;
@Experimental
-public interface ClusterConfigurationService {
+public interface ConfigurationPersistenceService {
String CLUSTER_CONFIG = "cluster";
/**
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/AbstractDistributionConfig.java
index f4f96f8..1b6c276 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/AbstractDistributionConfig.java
@@ -1087,7 +1087,7 @@ public abstract class AbstractDistributionConfig extends AbstractConfig
m.put(LOAD_CLUSTER_CONFIGURATION_FROM_DIR,
LocalizedStrings.AbstractDistributionConfig_LOAD_SHARED_CONFIGURATION_FROM_DIR
.toLocalizedString(
- InternalClusterConfigurationService.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME));
+ InternalConfigurationPersistenceService.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME));
m.put(CLUSTER_CONFIGURATION_DIR,
LocalizedStrings.AbstractDistributionConfig_CLUSTER_CONFIGURATION_DIR.toLocalizedString());
m.put(SSL_SERVER_ALIAS, LocalizedStrings.AbstractDistributionConfig_SERVER_SSL_ALIAS_0
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalClusterConfigurationService.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceService.java
similarity index 96%
rename from geode-core/src/main/java/org/apache/geode/distributed/internal/InternalClusterConfigurationService.java
rename to geode-core/src/main/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceService.java
index b819ccc..489801b 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalClusterConfigurationService.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceService.java
@@ -76,7 +76,7 @@ import org.apache.geode.cache.TimeoutException;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.configuration.XSDRootElement;
import org.apache.geode.cache.execute.ResultCollector;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedLockService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.DistributedSystem;
@@ -102,7 +102,7 @@ import org.apache.geode.management.internal.configuration.messages.SharedConfigu
import org.apache.geode.management.internal.configuration.utils.XmlUtils;
@SuppressWarnings({"deprecation", "unchecked"})
-public class InternalClusterConfigurationService implements ClusterConfigurationService {
+public class InternalConfigurationPersistenceService implements ConfigurationPersistenceService {
private static final Logger logger = LogService.getLogger();
/**
@@ -140,7 +140,7 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
private JAXBService jaxbService;
@TestingOnly
- InternalClusterConfigurationService(Class<?>... xsdClasses) {
+ InternalConfigurationPersistenceService(Class<?>... xsdClasses) {
configDirPath = null;
configDiskDirPath = null;
cache = null;
@@ -148,7 +148,7 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
jaxbService.validateWithLocalCacheXSD();
}
- public InternalClusterConfigurationService(InternalCache cache, Class<?>... xsdClasses)
+ public InternalConfigurationPersistenceService(InternalCache cache, Class<?>... xsdClasses)
throws IOException {
this.cache = cache;
Properties properties = cache.getDistributedSystem().getProperties();
@@ -235,7 +235,7 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
try {
Region<String, Configuration> configRegion = getConfigurationRegion();
if (groups == null || groups.length == 0) {
- groups = new String[] {ClusterConfigurationService.CLUSTER_CONFIG};
+ groups = new String[] {ConfigurationPersistenceService.CLUSTER_CONFIG};
}
for (String group : groups) {
Configuration configuration = configRegion.get(group);
@@ -301,7 +301,7 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
lockSharedConfiguration();
try {
if (groups == null) {
- groups = new String[] {ClusterConfigurationService.CLUSTER_CONFIG};
+ groups = new String[] {ConfigurationPersistenceService.CLUSTER_CONFIG};
}
Region<String, Configuration> configRegion = getConfigurationRegion();
for (String group : groups) {
@@ -347,7 +347,7 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
lockSharedConfiguration();
try {
if (groups == null) {
- groups = new String[] {ClusterConfigurationService.CLUSTER_CONFIG};
+ groups = new String[] {ConfigurationPersistenceService.CLUSTER_CONFIG};
}
Region<String, Configuration> configRegion = getConfigurationRegion();
for (String group : groups) {
@@ -509,7 +509,7 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
try {
if (loadSharedConfigFromDir) {
logger.info("Reading cluster configuration from '{}' directory",
- InternalClusterConfigurationService.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME);
+ InternalConfigurationPersistenceService.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME);
loadSharedConfigurationFromDisk();
} else {
persistSecuritySettings(configRegion);
@@ -536,10 +536,10 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
Properties securityProps = this.cache.getDistributedSystem().getSecurityProperties();
Configuration clusterPropertiesConfig =
- configRegion.get(ClusterConfigurationService.CLUSTER_CONFIG);
+ configRegion.get(ConfigurationPersistenceService.CLUSTER_CONFIG);
if (clusterPropertiesConfig == null) {
- clusterPropertiesConfig = new Configuration(ClusterConfigurationService.CLUSTER_CONFIG);
- configRegion.put(ClusterConfigurationService.CLUSTER_CONFIG, clusterPropertiesConfig);
+ clusterPropertiesConfig = new Configuration(ConfigurationPersistenceService.CLUSTER_CONFIG);
+ configRegion.put(ConfigurationPersistenceService.CLUSTER_CONFIG, clusterPropertiesConfig);
}
// put security-manager and security-post-processor in the cluster config
Properties clusterProperties = clusterPropertiesConfig.getGemfireProperties();
@@ -555,7 +555,7 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
/**
* Creates a ConfigurationResponse based on the configRequest, configuration response contains the
- * requested shared configuration This method locks the ClusterConfigurationService
+ * requested shared configuration This method locks the ConfigurationPersistenceService
*/
public ConfigurationResponse createConfigurationResponse(Set<String> groups) {
ConfigurationResponse configResponse = null;
@@ -564,7 +564,7 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
try {
if (isLocked) {
configResponse = new ConfigurationResponse();
- groups.add(ClusterConfigurationService.CLUSTER_CONFIG);
+ groups.add(ConfigurationPersistenceService.CLUSTER_CONFIG);
logger.info("Building up configuration response with following configurations: {}", groups);
for (String group : groups) {
@@ -638,7 +638,7 @@ public class InternalClusterConfigurationService implements ClusterConfiguration
}
/**
- * Gets the current status of the ClusterConfigurationService If the status is started , it
+ * Gets the current status of the ConfigurationPersistenceService If the status is started , it
* determines if the shared configuration is waiting for new configuration on other locators
*
* @return {@link SharedConfigurationStatus}
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
index be5f649..8b78b80 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
@@ -173,7 +173,7 @@ public class InternalLocator extends Locator implements ConnectListener {
private final AtomicBoolean shutdownHandled = new AtomicBoolean(false);
- private InternalClusterConfigurationService sharedConfig;
+ private InternalConfigurationPersistenceService configurationPersistenceService;
private volatile boolean isSharedConfigurationStarted = false;
@@ -188,8 +188,8 @@ public class InternalLocator extends Locator implements ConnectListener {
}
public boolean isSharedConfigurationRunning() {
- return this.sharedConfig != null
- && this.sharedConfig.getStatus() == SharedConfigurationStatus.RUNNING;
+ return this.configurationPersistenceService != null
+ && this.configurationPersistenceService.getStatus() == SharedConfigurationStatus.RUNNING;
}
/**
@@ -485,8 +485,8 @@ public class InternalLocator extends Locator implements ConnectListener {
this.server.start();
}
- public InternalClusterConfigurationService getSharedConfiguration() {
- return this.sharedConfig;
+ public InternalConfigurationPersistenceService getConfigurationPersistenceService() {
+ return this.configurationPersistenceService;
}
public DistributionConfigImpl getConfig() {
@@ -1036,13 +1036,14 @@ public class InternalLocator extends Locator implements ConnectListener {
this.myDs.setDependentLocator(this);
logger.info("Locator restart: initializing TcpServer");
- this.server.restarting(newSystem, newCache, this.sharedConfig);
+ this.server.restarting(newSystem, newCache, this.configurationPersistenceService);
if (this.productUseLog.isClosed()) {
this.productUseLog.reopen();
}
this.productUseLog.monitorUse(newSystem);
if (isSharedConfigurationEnabled()) {
- this.sharedConfig = new InternalClusterConfigurationService(newCache);
+ this.configurationPersistenceService =
+ new InternalConfigurationPersistenceService(newCache);
startSharedConfigurationService();
}
if (!this.server.isAlive()) {
@@ -1107,8 +1108,8 @@ public class InternalLocator extends Locator implements ConnectListener {
final InternalLocator locator = InternalLocator.this;
SharedConfigurationStatusResponse response;
- if (locator.sharedConfig != null) {
- response = locator.sharedConfig.createStatusResponse();
+ if (locator.configurationPersistenceService != null) {
+ response = locator.configurationPersistenceService.createStatusResponse();
} else {
response = new SharedConfigurationStatusResponse();
response.setStatus(SharedConfigurationStatus.UNDETERMINED);
@@ -1163,7 +1164,7 @@ public class InternalLocator extends Locator implements ConnectListener {
@Override
public void restarting(DistributedSystem ds, GemFireCache cache,
- InternalClusterConfigurationService sharedConfig) {
+ InternalConfigurationPersistenceService sharedConfig) {
if (ds != null) {
for (TcpHandler handler : this.allHandlers) {
handler.restarting(ds, cache, sharedConfig);
@@ -1325,11 +1326,13 @@ public class InternalLocator extends Locator implements ConnectListener {
}
try {
- if (locator.sharedConfig == null) {
- // locator.sharedConfig will already be created in case of auto-reconnect
- locator.sharedConfig = new InternalClusterConfigurationService(locator.myCache);
+ if (locator.configurationPersistenceService == null) {
+ // locator.configurationPersistenceService will already be created in case of auto-reconnect
+ locator.configurationPersistenceService =
+ new InternalConfigurationPersistenceService(locator.myCache);
}
- locator.sharedConfig.initSharedConfiguration(locator.loadFromSharedConfigDir());
+ locator.configurationPersistenceService
+ .initSharedConfiguration(locator.loadFromSharedConfigDir());
logger.info(
"Cluster configuration service start up completed successfully and is now running ....");
isSharedConfigurationStarted = true;
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/ServerLocator.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/ServerLocator.java
index 6c7b5a9..b9c2fcc 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/ServerLocator.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/ServerLocator.java
@@ -279,7 +279,7 @@ public class ServerLocator implements TcpHandler, DistributionAdvisee {
}
public void restarting(DistributedSystem ds, GemFireCache cache,
- InternalClusterConfigurationService sharedConfig) {
+ InternalConfigurationPersistenceService sharedConfig) {
if (ds != null) {
this.loadSnapshot = new LocatorLoadSnapshot();
this.ds = (InternalDistributedSystem) ds;
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/locator/GMSLocator.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/locator/GMSLocator.java
index 5062fbf..e6822c4 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/locator/GMSLocator.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/locator/GMSLocator.java
@@ -41,7 +41,7 @@ import org.apache.geode.InternalGemFireException;
import org.apache.geode.cache.GemFireCache;
import org.apache.geode.distributed.DistributedSystem;
import org.apache.geode.distributed.internal.ClusterDistributionManager;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalDistributedSystem;
import org.apache.geode.distributed.internal.LocatorStats;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
@@ -385,7 +385,7 @@ public class GMSLocator implements Locator, NetLocator {
@Override
public void restarting(DistributedSystem ds, GemFireCache cache,
- InternalClusterConfigurationService sharedConfig) {
+ InternalConfigurationPersistenceService sharedConfig) {
setMembershipManager(((InternalDistributedSystem) ds).getDM().getMembershipManager());
}
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpHandler.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpHandler.java
index 0d86565..424b3e4 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpHandler.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpHandler.java
@@ -18,7 +18,7 @@ import java.io.IOException;
import org.apache.geode.cache.GemFireCache;
import org.apache.geode.distributed.DistributedSystem;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
/**
* A handler which responds to messages for the {@link TcpServer}
@@ -48,7 +48,7 @@ public interface TcpHandler {
* @param sharedConfig TODO
*/
void restarting(DistributedSystem ds, GemFireCache cache,
- InternalClusterConfigurationService sharedConfig);
+ InternalConfigurationPersistenceService sharedConfig);
/**
* Initialize the handler with the TcpServer. Called before the TcpServer starts accepting
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
index 778e3d9..ae926e9 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
@@ -47,7 +47,7 @@ import org.apache.geode.cache.UnsupportedVersionException;
import org.apache.geode.distributed.internal.DistributionConfig;
import org.apache.geode.distributed.internal.DistributionConfigImpl;
import org.apache.geode.distributed.internal.DistributionStats;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalDistributedSystem;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.distributed.internal.PoolStatHelper;
@@ -204,7 +204,7 @@ public class TcpServer {
}
public void restarting(InternalDistributedSystem ds, InternalCache cache,
- InternalClusterConfigurationService sharedConfig) throws IOException {
+ InternalConfigurationPersistenceService sharedConfig) throws IOException {
this.shuttingDown = false;
this.handler.restarting(ds, cache, sharedConfig);
startServerThread();
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
index 8f63e82..d4bfd3d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
@@ -51,7 +51,7 @@ import org.apache.geode.cache.execute.FunctionException;
import org.apache.geode.cache.execute.FunctionInvocationTargetException;
import org.apache.geode.cache.execute.FunctionService;
import org.apache.geode.cache.execute.ResultCollector;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.LockServiceDestroyedException;
import org.apache.geode.distributed.internal.DistributionConfig;
@@ -169,7 +169,7 @@ public class ClusterConfigurationLoader {
// apply the cluster config first
Configuration clusterConfiguration =
- requestedConfiguration.get(ClusterConfigurationService.CLUSTER_CONFIG);
+ requestedConfiguration.get(ConfigurationPersistenceService.CLUSTER_CONFIG);
if (clusterConfiguration != null) {
String cacheXmlContent = clusterConfiguration.getCacheXmlContent();
if (StringUtils.isNotBlank(cacheXmlContent)) {
@@ -221,7 +221,7 @@ public class ClusterConfigurationLoader {
// apply the cluster config first
Configuration clusterConfiguration =
- requestedConfiguration.get(ClusterConfigurationService.CLUSTER_CONFIG);
+ requestedConfiguration.get(ConfigurationPersistenceService.CLUSTER_CONFIG);
if (clusterConfiguration != null) {
runtimeProps.putAll(clusterConfiguration.getGemfireProperties());
}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 8cd5eea..b90b0dc 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -147,7 +147,7 @@ import org.apache.geode.cache.wan.GatewayReceiver;
import org.apache.geode.cache.wan.GatewayReceiverFactory;
import org.apache.geode.cache.wan.GatewaySender;
import org.apache.geode.cache.wan.GatewaySenderFactory;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.ConfigurationProperties;
import org.apache.geode.distributed.DistributedLockService;
import org.apache.geode.distributed.DistributedMember;
@@ -1076,7 +1076,7 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
logger.info(response.describeConfig());
Configuration clusterConfig =
- response.getRequestedConfiguration().get(ClusterConfigurationService.CLUSTER_CONFIG);
+ response.getRequestedConfiguration().get(ConfigurationPersistenceService.CLUSTER_CONFIG);
Properties clusterSecProperties =
clusterConfig == null ? new Properties() : clusterConfig.getGemfireProperties();
diff --git a/geode-core/src/main/java/org/apache/geode/management/cli/GfshCommand.java b/geode-core/src/main/java/org/apache/geode/management/cli/GfshCommand.java
index 7cd822b..1be3399 100644
--- a/geode-core/src/main/java/org/apache/geode/management/cli/GfshCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/cli/GfshCommand.java
@@ -27,7 +27,7 @@ import org.apache.geode.cache.execute.Execution;
import org.apache.geode.cache.execute.Function;
import org.apache.geode.cache.execute.FunctionService;
import org.apache.geode.cache.execute.ResultCollector;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.cache.InternalCache;
@@ -77,9 +77,9 @@ public abstract class GfshCommand implements CommandMarker {
return cache;
}
- public ClusterConfigurationService getConfigurationService() {
+ public ConfigurationPersistenceService getConfigurationPersistenceService() {
InternalLocator locator = InternalLocator.getLocator();
- return locator == null ? null : locator.getSharedConfiguration();
+ return locator == null ? null : locator.getConfigurationPersistenceService();
}
public void setCache(Cache cache) {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/JmxManagerLocator.java b/geode-core/src/main/java/org/apache/geode/management/internal/JmxManagerLocator.java
index fc72de7..a0c0202 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/JmxManagerLocator.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/JmxManagerLocator.java
@@ -27,7 +27,7 @@ import org.apache.geode.cache.GemFireCache;
import org.apache.geode.cache.execute.FunctionContext;
import org.apache.geode.cache.execute.FunctionService;
import org.apache.geode.distributed.DistributedSystem;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.distributed.internal.tcpserver.TcpHandler;
import org.apache.geode.distributed.internal.tcpserver.TcpServer;
@@ -70,7 +70,7 @@ public class JmxManagerLocator implements TcpHandler {
@Override
public void restarting(DistributedSystem ds, GemFireCache cache,
- InternalClusterConfigurationService sharedConfig) {
+ InternalConfigurationPersistenceService sharedConfig) {
this.cache = (InternalCache) cache;
}
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 ffdaa72..565c8cf 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,7 +34,7 @@ import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import org.apache.geode.cache.Region;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.internal.cli.AbstractCliAroundInterceptor;
import org.apache.geode.management.internal.cli.GfshParseResult;
@@ -86,8 +86,8 @@ public class AlterAsyncEventQueueCommand extends InternalGfshCommand {
// need not check if any running servers has this async-event-queue. A server with this queue id
// may be shutdown, but we still need to update Cluster Configuration.
- InternalClusterConfigurationService service =
- (InternalClusterConfigurationService) getConfigurationService();
+ InternalConfigurationPersistenceService service =
+ (InternalConfigurationPersistenceService) getConfigurationPersistenceService();
if (service == null) {
return result.createError("Cluster Configuration Service is not available. "
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 008b21a..7104b99 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
@@ -26,7 +26,7 @@ import org.apache.geode.cache.CacheWriter;
import org.apache.geode.cache.CustomExpiry;
import org.apache.geode.cache.ExpirationAction;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
@@ -138,7 +138,7 @@ public class AlterRegionCommand extends InternalGfshCommand {
XmlEntity xmlEntity = findXmlEntity(regionAlterResults);
if (xmlEntity != null) {
persistClusterConfiguration(result,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.addXmlEntity(xmlEntity, groups));
}
return result;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRuntimeConfigCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRuntimeConfigCommand.java
index bc682c9..243dda3 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRuntimeConfigCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRuntimeConfigCommand.java
@@ -30,7 +30,7 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.xmlcache.CacheXml;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.internal.logging.log4j.LogLevel;
@@ -217,7 +217,7 @@ public class AlterRuntimeConfigCommand extends InternalGfshCommand {
final XmlEntity xmlEntity = XmlEntity.builder().withType(CacheXml.CACHE)
.withAttributes(rumTimeCacheAttributes).build();
persistClusterConfiguration(result,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.modifyXmlAndProperties(properties, xmlEntity, group));
return result;
} else {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommand.java
index ffa2aa4..7775b98 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommand.java
@@ -25,7 +25,7 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.configuration.ParameterType;
import org.apache.geode.cache.configuration.PdxType;
import org.apache.geode.cache.configuration.StringType;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.Result;
import org.apache.geode.management.internal.cli.AbstractCliAroundInterceptor;
@@ -66,7 +66,7 @@ public class ConfigurePDXCommand extends InternalGfshCommand {
Result result;
ReflectionBasedAutoSerializer autoSerializer = null;
- if (getConfigurationService() == null) {
+ if (getConfigurationPersistenceService() == null) {
return ResultBuilder
.createUserErrorResult("Configure pdx failed because cluster configuration is disabled.");
}
@@ -105,8 +105,8 @@ public class ConfigurePDXCommand extends InternalGfshCommand {
result = ResultBuilder.buildResult(infoResultData);
ReflectionBasedAutoSerializer finalAutoSerializer = autoSerializer;
- getConfigurationService().updateCacheConfig(InternalClusterConfigurationService.CLUSTER_CONFIG,
- config -> {
+ getConfigurationPersistenceService()
+ .updateCacheConfig(ConfigurationPersistenceService.CLUSTER_CONFIG, config -> {
if (config.getPdx() == null) {
config.setPdx(new PdxType());
}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommand.java
index ecb3a0b..0f9b70d 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommand.java
@@ -24,7 +24,7 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueFactoryImpl;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.Result;
import org.apache.geode.management.internal.cli.functions.AsyncEventQueueFunctionArgs;
@@ -125,7 +125,7 @@ public class CreateAsyncEventQueueCommand extends InternalGfshCommand {
XmlEntity xmlEntity = findXmlEntity(results);
if (xmlEntity != null) {
persistClusterConfiguration(commandResult,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.addXmlEntity(xmlEntity, groups));
}
return commandResult;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommand.java
index 7001d0b..dd00505 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommand.java
@@ -27,7 +27,7 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.Result;
@@ -154,7 +154,7 @@ public class CreateDefinedIndexesCommand extends InternalGfshCommand {
for (XmlEntity xmlEntity : xmlEntities) {
persistClusterConfiguration(result,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.addXmlEntity(xmlEntity, group));
}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDiskStoreCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDiskStoreCommand.java
index faa5bb8..e3fcff5 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDiskStoreCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDiskStoreCommand.java
@@ -23,7 +23,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.DiskStoreAttributes;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
@@ -120,7 +120,7 @@ public class CreateDiskStoreCommand extends InternalGfshCommand {
if (xmlEntity != null) {
persistClusterConfiguration(result,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.addXmlEntity(xmlEntity, groups));
}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewayReceiverCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewayReceiverCommand.java
index 0e724a4..86d7b60 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewayReceiverCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewayReceiverCommand.java
@@ -23,7 +23,7 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.wan.GatewayReceiver;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.Result;
@@ -109,14 +109,14 @@ public class CreateGatewayReceiverCommand extends InternalGfshCommand {
}
// has xml but unable to persist to cluster config, need to print warning message and return
- if (onMember != null || getConfigurationService() == null) {
+ if (onMember != null || getConfigurationPersistenceService() == null) {
result.setCommandPersisted(false);
return result;
}
// update cluster config
- ((InternalClusterConfigurationService) getConfigurationService()).addXmlEntity(xmlEntity,
- onGroups);
+ ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
+ .addXmlEntity(xmlEntity, onGroups);
return result;
}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewaySenderCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewaySenderCommand.java
index b47c745..c428574 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewaySenderCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewaySenderCommand.java
@@ -23,7 +23,7 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.wan.GatewaySender.OrderPolicy;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.Version;
import org.apache.geode.management.cli.CliMetaData;
@@ -138,14 +138,14 @@ public class CreateGatewaySenderCommand extends InternalGfshCommand {
}
// has xml but unable to persist to cluster config, need to print warning message and return
- if (onMember != null || getConfigurationService() == null) {
+ if (onMember != null || getConfigurationPersistenceService() == null) {
result.setCommandPersisted(false);
return result;
}
// update cluster config
- ((InternalClusterConfigurationService) getConfigurationService()).addXmlEntity(xmlEntity,
- onGroups);
+ ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
+ .addXmlEntity(xmlEntity, onGroups);
return result;
}
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 e940dc9..e542b14 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
@@ -29,7 +29,7 @@ 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.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.Result;
@@ -148,8 +148,8 @@ public class CreateJndiBindingCommand extends InternalGfshCommand {
Result result;
boolean persisted = false;
- InternalClusterConfigurationService service =
- (InternalClusterConfigurationService) getConfigurationService();
+ InternalConfigurationPersistenceService service =
+ (InternalConfigurationPersistenceService) getConfigurationPersistenceService();
if (service != null) {
CacheConfig cacheConfig = service.getCacheConfig("cluster");
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
index e2e0021..cc1943a 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
@@ -41,7 +41,7 @@ import org.apache.geode.cache.RegionAttributes;
import org.apache.geode.cache.RegionShortcut;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.i18n.LocalizedStrings;
import org.apache.geode.management.DistributedRegionMXBean;
@@ -442,7 +442,7 @@ public class CreateRegionCommand extends InternalGfshCommand {
if (xmlEntity != null) {
verifyDistributedRegionMbean(cache, regionPath);
persistClusterConfiguration(result,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.addXmlEntity(xmlEntity, groups));
}
return result;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommand.java
index f514c47..00b6722 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommand.java
@@ -36,7 +36,7 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.Result;
@@ -136,8 +136,8 @@ public class DeployCommand extends InternalGfshCommand {
}
Result result = ResultBuilder.buildResult(tabularData);
- InternalClusterConfigurationService sc =
- (InternalClusterConfigurationService) getConfigurationService();
+ InternalConfigurationPersistenceService sc =
+ (InternalConfigurationPersistenceService) getConfigurationPersistenceService();
if (sc == null) {
result.setCommandPersisted(false);
} else {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DescribeJndiBindingCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DescribeJndiBindingCommand.java
index 4f1c97e..0b14af9 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DescribeJndiBindingCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DescribeJndiBindingCommand.java
@@ -24,7 +24,7 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.configuration.JndiBindingsType;
import org.apache.geode.cache.execute.Function;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.internal.cli.functions.ListJndiBindingFunction;
@@ -51,8 +51,8 @@ public class DescribeJndiBindingCommand extends InternalGfshCommand {
ResultModel crm = new ResultModel();
TabularResultModel tabularData = crm.addTable();
- InternalClusterConfigurationService ccService =
- (InternalClusterConfigurationService) getConfigurationService();
+ InternalConfigurationPersistenceService ccService =
+ (InternalConfigurationPersistenceService) getConfigurationPersistenceService();
if (ccService != null) {
CacheConfig cacheConfig = ccService.getCacheConfig("cluster");
if (cacheConfig == null) {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommand.java
index 331405e..dc2e258 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommand.java
@@ -24,7 +24,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.Result;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
@@ -73,7 +73,7 @@ public class DestroyAsyncEventQueueCommand extends InternalGfshCommand {
XmlEntity xmlEntity = findXmlEntity(functionResults);
if (xmlEntity != null) {
persistClusterConfiguration(commandResult,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.deleteXmlEntity(xmlEntity, onGroups));
}
return commandResult;
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 d2e7885..0e06562 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,7 +22,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.Result;
@@ -65,7 +65,7 @@ public class DestroyDiskStoreCommand extends InternalGfshCommand {
if (xmlEntity != null) {
persistClusterConfiguration(result,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.deleteXmlEntity(xmlEntity, groups));
}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyGatewayReceiverCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyGatewayReceiverCommand.java
index d7db2c5..a7a6c8d 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyGatewayReceiverCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyGatewayReceiverCommand.java
@@ -22,7 +22,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.Result;
@@ -66,8 +66,8 @@ public class DestroyGatewayReceiverCommand extends InternalGfshCommand {
CommandResult result = ResultBuilder.buildResult(functionResults);
// Only update the cluster config if the command is not executed on specific members.
- InternalClusterConfigurationService service =
- (InternalClusterConfigurationService) getConfigurationService();
+ InternalConfigurationPersistenceService service =
+ (InternalConfigurationPersistenceService) getConfigurationPersistenceService();
if (onMember == null && result.getStatus().equals(Result.Status.OK) && service != null) {
if (onGroups == null) {
onGroups = new String[] {"cluster"};
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyGatewaySenderCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyGatewaySenderCommand.java
index fc95c8c..cc838f8 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyGatewaySenderCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyGatewaySenderCommand.java
@@ -23,7 +23,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
@@ -76,14 +76,14 @@ public class DestroyGatewaySenderCommand extends InternalGfshCommand {
}
// has xml but unable to persist to cluster config, need to print warning message and return
- if (onMember != null || getConfigurationService() == null) {
+ if (onMember != null || getConfigurationPersistenceService() == null) {
result.setCommandPersisted(false);
return result;
}
// update cluster config
- ((InternalClusterConfigurationService) getConfigurationService()).deleteXmlEntity(xmlEntity,
- onGroups);
+ ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
+ .deleteXmlEntity(xmlEntity, onGroups);
return result;
}
}
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 9d0c613..210d32d 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
@@ -23,7 +23,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.lang.StringUtils;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
@@ -83,7 +83,7 @@ public class DestroyIndexCommand extends InternalGfshCommand {
if (xmlEntity != null) {
persistClusterConfiguration(result,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.deleteXmlEntity(xmlEntity, group));
}
return result;
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 e1540dc..f40328d 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
@@ -25,7 +25,7 @@ import org.springframework.shell.core.annotation.CliOption;
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.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.Result;
import org.apache.geode.management.internal.cli.exceptions.EntityNotFoundException;
@@ -58,8 +58,8 @@ public class DestroyJndiBindingCommand extends InternalGfshCommand {
Result result;
boolean persisted = false;
- InternalClusterConfigurationService service =
- (InternalClusterConfigurationService) getConfigurationService();
+ InternalConfigurationPersistenceService service =
+ (InternalConfigurationPersistenceService) getConfigurationPersistenceService();
if (service != null) {
service.updateCacheConfig("cluster", cc -> {
List<JndiBindingsType.JndiBinding> bindings = cc.getJndiBindings();
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 f11725b..ba84405 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
@@ -21,7 +21,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.Result;
@@ -71,7 +71,7 @@ public class DestroyRegionCommand extends InternalGfshCommand {
// if at least one member returns with successful deletion, we will need to update cc
if (xmlEntity != null) {
persistClusterConfiguration(result,
- () -> ((InternalClusterConfigurationService) getConfigurationService())
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
.deleteXmlEntity(xmlEntity, null));
}
return result;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportImportClusterConfigurationCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportImportClusterConfigurationCommands.java
index f92ef8f..162b33d 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportImportClusterConfigurationCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportImportClusterConfigurationCommands.java
@@ -38,7 +38,7 @@ import org.xml.sax.SAXException;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.cli.CliMetaData;
@@ -94,7 +94,7 @@ public class ExportImportClusterConfigurationCommands extends InternalGfshComman
}
File zipFile = tempDir.resolve("exportedCC.zip").toFile();
- InternalClusterConfigurationService sc = locator.getSharedConfiguration();
+ InternalConfigurationPersistenceService sc = locator.getConfigurationPersistenceService();
Result result;
try {
@@ -134,8 +134,8 @@ public class ExportImportClusterConfigurationCommands extends InternalGfshComman
help = CliStrings.IMPORT_SHARED_CONFIG__ZIP__HELP) String zip)
throws IOException, TransformerException, SAXException, ParserConfigurationException {
- InternalClusterConfigurationService sc =
- (InternalClusterConfigurationService) getConfigurationService();
+ InternalConfigurationPersistenceService sc =
+ (InternalConfigurationPersistenceService) getConfigurationPersistenceService();
if (sc == null) {
return ResultBuilder.createGemFireErrorResult(CliStrings.SHARED_CONFIGURATION_NOT_STARTED);
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/InternalGfshCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/InternalGfshCommand.java
index 6edf94c..62f117d 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/InternalGfshCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/InternalGfshCommand.java
@@ -38,7 +38,7 @@ public abstract class InternalGfshCommand extends GfshCommand {
if (result == null) {
throw new IllegalArgumentException("Result should not be null");
}
- if (getConfigurationService() == null) {
+ if (getConfigurationPersistenceService() == null) {
result.setCommandPersisted(false);
} else {
runnable.run();
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListJndiBindingCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListJndiBindingCommand.java
index 54b7571..21f24af 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListJndiBindingCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListJndiBindingCommand.java
@@ -26,7 +26,7 @@ import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.configuration.JndiBindingsType;
import org.apache.geode.cache.execute.Function;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.cli.Result;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
@@ -54,8 +54,8 @@ public class ListJndiBindingCommand extends InternalGfshCommand {
TabularResultData configTable = null;
TabularResultData memberTable = null;
- InternalClusterConfigurationService ccService =
- (InternalClusterConfigurationService) getConfigurationService();
+ InternalConfigurationPersistenceService ccService =
+ (InternalConfigurationPersistenceService) getConfigurationPersistenceService();
if (ccService != null) {
configTable = resultSection.addTable();
// we don't support creating jndi binding with random group name yet
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/UndeployCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/UndeployCommand.java
index f2cb729..65f4fdf 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/UndeployCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/UndeployCommand.java
@@ -24,7 +24,7 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.SystemFailure;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.ConverterHint;
import org.apache.geode.management.cli.Result;
@@ -100,8 +100,8 @@ public class UndeployCommand extends InternalGfshCommand {
Result result = ResultBuilder.buildResult(tabularData);
if (tabularData.getStatus().equals(Result.Status.OK)) {
persistClusterConfiguration(result,
- () -> ((InternalClusterConfigurationService) getConfigurationService()).removeJars(jars,
- groups));
+ () -> ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
+ .removeJars(jars, groups));
}
return result;
} catch (VirtualMachineError e) {
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
index 0a2bba2..5902980 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
@@ -42,7 +42,7 @@ import org.apache.geode.cache.PartitionAttributesFactory;
import org.apache.geode.cache.server.CacheServer;
import org.apache.geode.distributed.ConfigurationProperties;
import org.apache.geode.distributed.internal.DistributionConfig;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.xmlcache.CacheXml;
import org.apache.geode.management.internal.cli.shell.Gfsh;
@@ -2413,7 +2413,8 @@ public class CliStrings {
"Deprecated: Since Geode 1.6, use import cluster-configuration command instead. When \" "
+ START_LOCATOR__LOAD__SHARED_CONFIGURATION__FROM__FILESYSTEM
+ " \" is set to true, the locator loads the cluster configuration from the \""
- + InternalClusterConfigurationService.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME + "\" directory.";
+ + InternalConfigurationPersistenceService.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME
+ + "\" directory.";
public static final String START_LOCATOR__CLUSTER__CONFIG__DIR = "cluster-config-dir";
public static final String START_LOCATOR__CLUSTER__CONFIG__DIR__HELP =
"Directory used by the cluster configuration service to store the cluster configuration on the filesystem";
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/remote/CommandExecutor.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/remote/CommandExecutor.java
index dc402ed..6c6abd8 100755
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/remote/CommandExecutor.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/remote/CommandExecutor.java
@@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger;
import org.springframework.util.ReflectionUtils;
import org.apache.geode.SystemFailure;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.cli.Result;
import org.apache.geode.management.cli.SingleGfshCommand;
@@ -113,7 +113,7 @@ public class CommandExecutor {
}
// if command result is ok, we will need to see if we need to update cluster configuration
- ClusterConfigurationService ccService = gfshCommand.getConfigurationService();
+ ConfigurationPersistenceService ccService = gfshCommand.getConfigurationPersistenceService();
if (parseResult.getParamValue("member") != null || ccService == null) {
commandResult.setCommandPersisted(false);
return commandResult;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/callbacks/ConfigurationChangeListener.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/callbacks/ConfigurationChangeListener.java
index b14019d..71d7005 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/callbacks/ConfigurationChangeListener.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/callbacks/ConfigurationChangeListener.java
@@ -26,7 +26,7 @@ import org.apache.logging.log4j.Logger;
import org.apache.geode.cache.EntryEvent;
import org.apache.geode.cache.util.CacheListenerAdapter;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.management.internal.configuration.domain.Configuration;
@@ -38,10 +38,10 @@ import org.apache.geode.management.internal.configuration.domain.Configuration;
public class ConfigurationChangeListener extends CacheListenerAdapter<String, Configuration> {
private static final Logger logger = LogService.getLogger();
- private final InternalClusterConfigurationService sharedConfig;
+ private final InternalConfigurationPersistenceService sharedConfig;
private final InternalCache cache;
- public ConfigurationChangeListener(InternalClusterConfigurationService sharedConfig,
+ public ConfigurationChangeListener(InternalConfigurationPersistenceService sharedConfig,
InternalCache cache) {
this.sharedConfig = sharedConfig;
this.cache = cache;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/functions/DownloadJarFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/functions/DownloadJarFunction.java
index 0fb7517..88712fb 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/functions/DownloadJarFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/functions/DownloadJarFunction.java
@@ -30,7 +30,7 @@ import org.apache.logging.log4j.Logger;
import org.apache.geode.cache.execute.FunctionContext;
import org.apache.geode.cache.execute.FunctionException;
import org.apache.geode.distributed.Locator;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.cache.execute.InternalFunction;
import org.apache.geode.internal.logging.LogService;
@@ -50,7 +50,8 @@ public class DownloadJarFunction implements InternalFunction<Object[]> {
RemoteInputStream result = null;
if (locator != null && group != null && jarName != null) {
- InternalClusterConfigurationService sharedConfig = locator.getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ locator.getConfigurationPersistenceService();
if (sharedConfig != null) {
try {
File jarFile = sharedConfig.getPathToJarOnThisLocator(group, jarName).toFile();
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/functions/GetClusterConfigurationFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/functions/GetClusterConfigurationFunction.java
index 099077c..b4e57cd 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/functions/GetClusterConfigurationFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/functions/GetClusterConfigurationFunction.java
@@ -19,7 +19,7 @@ import java.util.Set;
import org.apache.logging.log4j.Logger;
import org.apache.geode.cache.execute.FunctionContext;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.cache.execute.InternalFunction;
import org.apache.geode.internal.logging.LogService;
@@ -45,8 +45,8 @@ public class GetClusterConfigurationFunction implements InternalFunction {
// Shared configuration enabled.
if (internalLocator.isSharedConfigurationRunning()) {
// Cluster configuration is up and running already.
- InternalClusterConfigurationService clusterConfigurationService =
- internalLocator.getSharedConfiguration();
+ InternalConfigurationPersistenceService clusterConfigurationService =
+ internalLocator.getConfigurationPersistenceService();
try {
ConfigurationResponse response =
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/handlers/SharedConfigurationStatusRequestHandler.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/handlers/SharedConfigurationStatusRequestHandler.java
index 1a7db96..b9cf293 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/handlers/SharedConfigurationStatusRequestHandler.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/handlers/SharedConfigurationStatusRequestHandler.java
@@ -18,7 +18,7 @@ import java.io.IOException;
import org.apache.geode.cache.GemFireCache;
import org.apache.geode.distributed.DistributedSystem;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.distributed.internal.tcpserver.TcpHandler;
import org.apache.geode.distributed.internal.tcpserver.TcpServer;
@@ -56,7 +56,7 @@ public class SharedConfigurationStatusRequestHandler implements TcpHandler {
@Override
public void restarting(DistributedSystem system, GemFireCache cache,
- InternalClusterConfigurationService sharedConfig) {
+ InternalConfigurationPersistenceService sharedConfig) {
}
diff --git a/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
index 81ffe03..f1cac4b 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
@@ -60,7 +60,7 @@ import org.apache.geode.cache.client.internal.locator.LocatorListResponse;
import org.apache.geode.cache.query.QueryService;
import org.apache.geode.distributed.DistributedSystem;
import org.apache.geode.distributed.internal.DistributionConfig;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalDistributedSystem;
import org.apache.geode.distributed.internal.PoolStatHelper;
import org.apache.geode.distributed.internal.ServerLocation;
@@ -416,7 +416,7 @@ public class AutoConnectionSourceImplJUnitTest {
public void endResponse(Object request, long startTime) {}
public void restarting(DistributedSystem ds, GemFireCache cache,
- InternalClusterConfigurationService sharedConfig) {}
+ InternalConfigurationPersistenceService sharedConfig) {}
}
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherIntegrationTestCase.java b/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherIntegrationTestCase.java
index d7c7e9c..f5bd2d6 100755
--- a/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherIntegrationTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherIntegrationTestCase.java
@@ -21,7 +21,7 @@ import static org.apache.geode.distributed.ConfigurationProperties.DISABLE_AUTO_
import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL;
import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
import static org.apache.geode.distributed.internal.DistributionConfig.GEMFIRE_PREFIX;
-import static org.apache.geode.distributed.internal.InternalClusterConfigurationService.CLUSTER_CONFIG_DISK_DIR_PREFIX;
+import static org.apache.geode.distributed.internal.InternalConfigurationPersistenceService.CLUSTER_CONFIG_DISK_DIR_PREFIX;
import static org.apache.geode.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
import static org.apache.geode.internal.DistributionLocator.TEST_OVERRIDE_DEFAULT_PORT_PROPERTY;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/ClusterConfigurationServiceDUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/CacheConfigDAODUnitTest.java
similarity index 89%
rename from geode-core/src/test/java/org/apache/geode/distributed/internal/ClusterConfigurationServiceDUnitTest.java
rename to geode-core/src/test/java/org/apache/geode/distributed/internal/CacheConfigDAODUnitTest.java
index c2809d2..71d32fb 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/ClusterConfigurationServiceDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/CacheConfigDAODUnitTest.java
@@ -24,14 +24,14 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.apache.geode.cache.configuration.RegionConfig;
-import org.apache.geode.distributed.ClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
import org.apache.geode.test.junit.categories.DistributedTest;
@Category(DistributedTest.class)
-public class ClusterConfigurationServiceDUnitTest {
+public class CacheConfigDAODUnitTest {
@Rule
@@ -42,8 +42,8 @@ public class ClusterConfigurationServiceDUnitTest {
MemberVM locator = cluster.startLocatorVM(0);
locator.invoke(() -> {
- ClusterConfigurationService ccService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ ConfigurationPersistenceService ccService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
ccService.updateCacheConfig("cluster", cc -> {
RegionConfig regionConfig = new RegionConfig();
regionConfig.setName("regionB");
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/InternalClusterConfigurationServiceTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceServiceTest.java
similarity index 95%
rename from geode-core/src/test/java/org/apache/geode/distributed/internal/InternalClusterConfigurationServiceTest.java
rename to geode-core/src/test/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceServiceTest.java
index aeeefbc..1e520db 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/InternalClusterConfigurationServiceTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceServiceTest.java
@@ -43,15 +43,15 @@ import org.apache.geode.test.junit.categories.UnitTest;
@Category(UnitTest.class)
-public class InternalClusterConfigurationServiceTest {
- private InternalClusterConfigurationService service, service2;
+public class InternalConfigurationPersistenceServiceTest {
+ private InternalConfigurationPersistenceService service, service2;
private Configuration configuration;
@Before
public void setUp() throws Exception {
- service = spy(new InternalClusterConfigurationService(CacheConfig.class, ElementOne.class,
+ service = spy(new InternalConfigurationPersistenceService(CacheConfig.class, ElementOne.class,
ElementTwo.class));
- service2 = spy(new InternalClusterConfigurationService(CacheConfig.class));
+ service2 = spy(new InternalConfigurationPersistenceService(CacheConfig.class));
configuration = new Configuration("cluster");
doReturn(configuration).when(service).getConfiguration(any());
doReturn(configuration).when(service2).getConfiguration(any());
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/tcpserver/TcpServerJUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/tcpserver/TcpServerJUnitTest.java
index de84830..80cef7e 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/tcpserver/TcpServerJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/tcpserver/TcpServerJUnitTest.java
@@ -39,7 +39,7 @@ import org.apache.geode.DataSerializable;
import org.apache.geode.cache.GemFireCache;
import org.apache.geode.distributed.DistributedSystem;
import org.apache.geode.distributed.internal.DistributionConfigImpl;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.PoolStatHelper;
import org.apache.geode.internal.AvailablePort;
import org.apache.geode.internal.cache.tier.sockets.TcpServerFactory;
@@ -183,7 +183,7 @@ public class TcpServerJUnitTest {
}
public void restarting(DistributedSystem ds, GemFireCache cache,
- InternalClusterConfigurationService sharedConfig) {}
+ InternalConfigurationPersistenceService sharedConfig) {}
public void endRequest(Object request, long startTime) {}
@@ -216,7 +216,7 @@ public class TcpServerJUnitTest {
public void shutDown() {}
public void restarting(DistributedSystem ds, GemFireCache cache,
- InternalClusterConfigurationService sharedConfig) {}
+ InternalConfigurationPersistenceService sharedConfig) {}
public void endRequest(Object request, long startTime) {}
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/extension/mock/MockExtensionCommands.java b/geode-core/src/test/java/org/apache/geode/internal/cache/extension/mock/MockExtensionCommands.java
index a76c1c1..cb3b8ef 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/extension/mock/MockExtensionCommands.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/extension/mock/MockExtensionCommands.java
@@ -26,7 +26,7 @@ import org.apache.geode.cache.Region;
import org.apache.geode.cache.execute.Function;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.cache.GemFireCacheImpl;
import org.apache.geode.internal.cache.InternalCache;
@@ -202,8 +202,8 @@ public class MockExtensionCommands extends GfshCommand {
final Result result = ResultBuilder.buildResult(tabularResultData);
- InternalClusterConfigurationService ccService =
- InternalLocator.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService ccService =
+ InternalLocator.getLocator().getConfigurationPersistenceService();
System.out.println("MockExtensionCommands: persisting xmlEntity=" + xmlEntity);
if (null != xmlEntity.get()) {
if (addXmlElement) {
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommandTest.java
index 2eaf7cb..4c4fbf4 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommandTest.java
@@ -40,7 +40,7 @@ import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.apache.geode.cache.Region;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.internal.configuration.domain.Configuration;
import org.apache.geode.management.internal.configuration.utils.XmlUtils;
import org.apache.geode.test.junit.categories.UnitTest;
@@ -54,14 +54,14 @@ public class AlterAsyncEventQueueCommandTest {
public static GfshParserRule gfsh = new GfshParserRule();
private AlterAsyncEventQueueCommand command;
- private InternalClusterConfigurationService service;
+ private InternalConfigurationPersistenceService service;
private Region<String, Configuration> configRegion;
@Before
public void before() throws Exception {
command = spy(AlterAsyncEventQueueCommand.class);
- service = mock(InternalClusterConfigurationService.class);
- doReturn(service).when(command).getConfigurationService();
+ service = mock(InternalConfigurationPersistenceService.class);
+ doReturn(service).when(command).getConfigurationPersistenceService();
configRegion = mock(Region.class);
when(service.getConfigurationRegion()).thenReturn(configRegion);
when(service.lockSharedConfiguration()).thenReturn(true);
@@ -111,7 +111,7 @@ public class AlterAsyncEventQueueCommandTest {
@Test
public void cluster_config_service_not_available() throws Exception {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
gfsh.executeAndAssertThat(command, "alter async-event-queue --id=test --batch-size=100")
.statusIsError().containsOutput("Cluster Configuration Service is not available");
}
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterCompressorDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterCompressorDUnitTest.java
index a7eb966..29e428f 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterCompressorDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterCompressorDUnitTest.java
@@ -29,7 +29,7 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.apache.geode.cache.Region;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.CachedDeserializable;
import org.apache.geode.internal.cache.CachedDeserializableFactory;
import org.apache.geode.internal.cache.EntryEventImpl;
@@ -129,8 +129,8 @@ public class AlterCompressorDUnitTest {
// add the compressor to the region attributes and put it back in cluster config
// this is just a hack to change the cache.xml so that when server restarts it restarts
// with new region attributes
- InternalClusterConfigurationService ccService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService ccService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration configuration = ccService.getConfiguration("dataStore");
String modifiedXml =
addCompressor(configuration.getCacheXmlContent(), TestCompressor1.class.getName());
@@ -170,8 +170,8 @@ public class AlterCompressorDUnitTest {
// remove the compressor to the region attributes and put it back in cluster config
// this is just a hack to change the cache.xml so that when server restarts it restarts
// with new region attributes
- InternalClusterConfigurationService ccService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService ccService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration configuration = ccService.getConfiguration("dataStore");
String modifiedXml = removeCompressor(configuration.getCacheXmlContent());
configuration.setCacheXmlContent(modifiedXml);
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommandIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommandIntegrationTest.java
index 2319e6f..ba102b1 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommandIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommandIntegrationTest.java
@@ -53,7 +53,7 @@ public class ConfigurePDXCommandIntegrationTest {
public void commandShouldSucceedWhenUsingDefaults() {
gfsh.executeAndAssertThat(BASE_COMMAND_STRING).statusIsSuccess().hasNoFailToPersistError();
- String sharedConfigXml = locator.getLocator().getSharedConfiguration()
+ String sharedConfigXml = locator.getLocator().getConfigurationPersistenceService()
.getConfiguration("cluster").getCacheXmlContent();
assertThat(sharedConfigXml).contains(
"<pdx read-serialized=\"false\" ignore-unread-fields=\"false\" persistent=\"false\"/>");
@@ -65,7 +65,7 @@ public class ConfigurePDXCommandIntegrationTest {
+ "--read-serialized=true --disk-store=myDiskStore --ignore-unread-fields=true --auto-serializable-classes=com.company.DomainObject.*#identity=id")
.statusIsSuccess().hasNoFailToPersistError();
- String sharedConfigXml = locator.getLocator().getSharedConfiguration()
+ String sharedConfigXml = locator.getLocator().getConfigurationPersistenceService()
.getConfiguration("cluster").getCacheXmlContent();
assertThat(sharedConfigXml).contains(
"<pdx read-serialized=\"true\" ignore-unread-fields=\"true\" persistent=\"true\" disk-store-name=\"myDiskStore\">");
@@ -83,7 +83,7 @@ public class ConfigurePDXCommandIntegrationTest {
+ "--read-serialized=false --ignore-unread-fields=false --auto-serializable-classes=com.company.DomainObject.*#identity=id")
.statusIsSuccess().hasNoFailToPersistError();
- String sharedConfigXml = locator.getLocator().getSharedConfiguration()
+ String sharedConfigXml = locator.getLocator().getConfigurationPersistenceService()
.getConfiguration("cluster").getCacheXmlContent();
assertThat(sharedConfigXml).contains(
"<pdx read-serialized=\"false\" ignore-unread-fields=\"false\" persistent=\"false\">");
@@ -101,7 +101,7 @@ public class ConfigurePDXCommandIntegrationTest {
+ "--read-serialized=true --disk-store=myDiskStore --ignore-unread-fields=true --portable-auto-serializable-classes=com.company.DomainObject.*#identity=id")
.statusIsSuccess().hasNoFailToPersistError();
- String sharedConfigXml = locator.getLocator().getSharedConfiguration()
+ String sharedConfigXml = locator.getLocator().getConfigurationPersistenceService()
.getConfiguration("cluster").getCacheXmlContent();
assertThat(sharedConfigXml).contains(
"<pdx read-serialized=\"true\" ignore-unread-fields=\"true\" persistent=\"true\" disk-store-name=\"myDiskStore\">");
@@ -121,7 +121,7 @@ public class ConfigurePDXCommandIntegrationTest {
+ "--read-serialized=false --ignore-unread-fields=false --portable-auto-serializable-classes=com.company.DomainObject.*#identity=id")
.statusIsSuccess().hasNoFailToPersistError();
- String sharedConfigXml = locator.getLocator().getSharedConfiguration()
+ String sharedConfigXml = locator.getLocator().getConfigurationPersistenceService()
.getConfiguration("cluster").getCacheXmlContent();
assertThat(sharedConfigXml).contains(
"<pdx read-serialized=\"false\" ignore-unread-fields=\"false\" persistent=\"false\">");
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommandTest.java
index dcb8efb..d293d66 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigurePDXCommandTest.java
@@ -34,8 +34,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.test.junit.categories.UnitTest;
import org.apache.geode.test.junit.rules.GfshParserRule;
@@ -46,7 +46,7 @@ public class ConfigurePDXCommandTest {
private InternalCache cache;
private ConfigurePDXCommand command;
- private InternalClusterConfigurationService clusterConfigurationService;
+ private ConfigurationPersistenceService clusterConfigurationService;
@Rule
public GfshParserRule gfshParserRule = new GfshParserRule();
@@ -55,16 +55,16 @@ public class ConfigurePDXCommandTest {
public void setUp() throws Exception {
cache = mock(InternalCache.class);
command = spy(ConfigurePDXCommand.class);
- clusterConfigurationService = mock(InternalClusterConfigurationService.class);
+ clusterConfigurationService = mock(ConfigurationPersistenceService.class);
doReturn(cache).when(command).getCache();
doReturn(Collections.emptySet()).when(command).getAllNormalMembers();
- doReturn(clusterConfigurationService).when(command).getConfigurationService();
+ doReturn(clusterConfigurationService).when(command).getConfigurationPersistenceService();
}
@Test
public void errorOutIfCCNotRunning() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
gfshParserRule.executeAndAssertThat(command, BASE_COMMAND_STRING).statusIsError()
.containsOutput("Configure pdx failed because cluster configuration is disabled.");
}
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index e3e3fe0..6be5750 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -55,7 +55,7 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.Region;
import org.apache.geode.distributed.Locator;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.AvailablePort;
import org.apache.geode.internal.AvailablePortHelper;
@@ -182,8 +182,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
// Make sure the region exists in the shared config
Host.getHost(0).getVM(0).invoke(() -> {
- InternalClusterConfigurationService sharedConfig =
- ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ((InternalLocator) Locator.getLocator()).getConfigurationPersistenceService();
try {
assertTrue(
sharedConfig.getConfiguration(groupName).getCacheXmlContent().contains(regionName));
@@ -224,8 +224,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
// Make sure the region was altered in the shared config
Host.getHost(0).getVM(0).invoke(() -> {
- InternalClusterConfigurationService sharedConfig =
- ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ((InternalLocator) Locator.getLocator()).getConfigurationPersistenceService();
try {
assertTrue(sharedConfig.getConfiguration(groupName).getCacheXmlContent().contains("45635"));
} catch (Exception e) {
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommandDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommandDUnitTest.java
index aec2627..b322a28 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommandDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommandDUnitTest.java
@@ -21,7 +21,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.wan.MyAsyncEventListener;
import org.apache.geode.management.internal.configuration.domain.Configuration;
import org.apache.geode.test.dunit.IgnoredException;
@@ -111,8 +111,8 @@ public class CreateAsyncEventQueueCommandDUnitTest {
gfsh.connectAndVerify(locator);
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
assertThat(service.getConfiguration("cluster").getCacheXmlContent()).isNull();
});
@@ -120,8 +120,8 @@ public class CreateAsyncEventQueueCommandDUnitTest {
.tableHasRowCount("Member", 1).tableHasColumnWithExactValuesInAnyOrder("Status", "Success");
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration configuration = service.getConfiguration("cluster");
configuration.getCacheXmlContent().contains("id=queue");
});
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommandTest.java
index 6465d7b..40c5e76 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommandTest.java
@@ -45,7 +45,7 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.apache.geode.cache.execute.Function;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.internal.cli.GfshParseResult;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
import org.apache.geode.management.internal.configuration.domain.XmlEntity;
@@ -62,13 +62,13 @@ public class CreateAsyncEventQueueCommandTest {
public static GfshParserRule gfsh = new GfshParserRule();
private CreateAsyncEventQueueCommand command;
- private InternalClusterConfigurationService service;
+ private InternalConfigurationPersistenceService service;
@Before
public void before() throws Exception {
command = spy(CreateAsyncEventQueueCommand.class);
- service = mock(InternalClusterConfigurationService.class);
- doReturn(service).when(command).getConfigurationService();
+ service = mock(InternalConfigurationPersistenceService.class);
+ doReturn(service).when(command).getConfigurationPersistenceService();
}
@Test
@@ -188,7 +188,7 @@ public class CreateAsyncEventQueueCommandTest {
@Test
public void command_succeeded_but_no_cluster_config_service() throws Exception {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.emptySet()).when(command).getMembers(any(), any());
List<CliFunctionResult> functionResults = new ArrayList<>();
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandDUnitTest.java
index 5149478..c08aa7c 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandDUnitTest.java
@@ -27,7 +27,7 @@ import org.apache.geode.cache.Cache;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.query.QueryService;
import org.apache.geode.distributed.Locator;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
@@ -140,8 +140,8 @@ public class CreateDefinedIndexesCommandDUnitTest {
locator.invoke(() -> {
// Make sure the indexes exist in the cluster config
- InternalClusterConfigurationService sharedConfig =
- ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ((InternalLocator) Locator.getLocator()).getConfigurationPersistenceService();
assertThat(sharedConfig.getConfiguration("cluster").getCacheXmlContent()).contains(index1Name,
index2Name);
assertThat(sharedConfig.getConfiguration("group1")).isNull();
@@ -202,8 +202,8 @@ public class CreateDefinedIndexesCommandDUnitTest {
locator.invoke(() -> {
// Make sure the indexes exist in the cluster config
- InternalClusterConfigurationService sharedConfig =
- ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ((InternalLocator) Locator.getLocator()).getConfigurationPersistenceService();
assertThat(sharedConfig.getConfiguration("group1").getCacheXmlContent()).contains(index2Name,
index1Name);
assertThat(sharedConfig.getConfiguration("cluster").getCacheXmlContent()).isNullOrEmpty();
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandTest.java
index 8ef228d..e8ecaeb 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandTest.java
@@ -40,7 +40,7 @@ import org.mockito.Mockito;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.cache.query.IndexType;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.internal.cli.domain.IndexInfo;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
import org.apache.geode.management.internal.cli.result.CommandResult;
@@ -86,10 +86,10 @@ public class CreateDefinedIndexesCommandTest {
public void creationFailure() throws Exception {
DistributedMember member = mock(DistributedMember.class);
when(member.getId()).thenReturn("memberId");
- InternalClusterConfigurationService mockService =
- mock(InternalClusterConfigurationService.class);
+ InternalConfigurationPersistenceService mockService =
+ mock(InternalConfigurationPersistenceService.class);
- doReturn(mockService).when(command).getConfigurationService();
+ doReturn(mockService).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(member)).when(command).findMembers(any(), any());
doReturn(Arrays.asList(new CliFunctionResult(member.getId(), new Exception("MockException"),
"Exception Message."))).when(resultCollector).getResult();
@@ -107,10 +107,10 @@ public class CreateDefinedIndexesCommandTest {
XmlEntity xmlEntity = mock(XmlEntity.class);
DistributedMember member = mock(DistributedMember.class);
when(member.getId()).thenReturn("memberId");
- InternalClusterConfigurationService mockService =
- mock(InternalClusterConfigurationService.class);
+ InternalConfigurationPersistenceService mockService =
+ mock(InternalConfigurationPersistenceService.class);
- doReturn(mockService).when(command).getConfigurationService();
+ doReturn(mockService).when(command).getConfigurationPersistenceService();
doReturn(Collections.singleton(member)).when(command).findMembers(any(), any());
doReturn(Arrays.asList(new CliFunctionResult(member.getId(), xmlEntity))).when(resultCollector)
.getResult();
@@ -134,8 +134,8 @@ public class CreateDefinedIndexesCommandTest {
when(member1.getId()).thenReturn("memberId_1");
when(member2.getId()).thenReturn("memberId_2");
- InternalClusterConfigurationService mockService =
- mock(InternalClusterConfigurationService.class);
+ InternalConfigurationPersistenceService mockService =
+ mock(InternalConfigurationPersistenceService.class);
CliFunctionResult member1Region1Result =
new CliFunctionResult(member1.getId(), xmlEntityRegion1);
CliFunctionResult member1Region2Result =
@@ -145,7 +145,7 @@ public class CreateDefinedIndexesCommandTest {
CliFunctionResult member2Region2Result =
new CliFunctionResult(member2.getId(), xmlEntityRegion2);
- doReturn(mockService).when(command).getConfigurationService();
+ doReturn(mockService).when(command).getConfigurationPersistenceService();
doReturn(new HashSet<>(Arrays.asList(new DistributedMember[] {member1, member2}))).when(command)
.findMembers(any(), any());
doReturn(Arrays.asList(new CliFunctionResult[] {member1Region1Result, member1Region2Result,
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateGatewayReceiverCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateGatewayReceiverCommandTest.java
index 49ef4e0..48a109c 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateGatewayReceiverCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateGatewayReceiverCommandTest.java
@@ -32,7 +32,7 @@ import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.internal.cli.GfshParseResult;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
@@ -50,18 +50,18 @@ public class CreateGatewayReceiverCommandTest {
private CreateGatewayReceiverCommand command;
private InternalCache cache;
private List<CliFunctionResult> functionResults;
- private InternalClusterConfigurationService ccService;
+ private InternalConfigurationPersistenceService ccService;
private CliFunctionResult result1;
private XmlEntity xmlEntity;
@Before
public void before() {
command = spy(CreateGatewayReceiverCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
+ ccService = mock(InternalConfigurationPersistenceService.class);
xmlEntity = mock(XmlEntity.class);
cache = mock(InternalCache.class);
doReturn(cache).when(command).getCache();
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
functionResults = new ArrayList<>();
doReturn(functionResults).when(command).executeAndGetFunctionResult(any(), any(),
any(Set.class));
@@ -92,7 +92,7 @@ public class CreateGatewayReceiverCommandTest {
@Test
public void whenNoCCService() {
doReturn(mock(Set.class)).when(command).getMembers(any(), any());
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
result1 = new CliFunctionResult("member", xmlEntity, "result1");
functionResults.add(result1);
gfsh.executeAndAssertThat(command, "create gateway-receiver").statusIsSuccess()
@@ -103,7 +103,7 @@ public class CreateGatewayReceiverCommandTest {
@Test
public void whenCommandOnMember() {
doReturn(mock(Set.class)).when(command).getMembers(any(), any());
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
result1 = new CliFunctionResult("member", xmlEntity, "result1");
functionResults.add(result1);
gfsh.executeAndAssertThat(command, "create gateway-receiver --member=xyz").statusIsSuccess()
@@ -114,7 +114,7 @@ public class CreateGatewayReceiverCommandTest {
@Test
public void whenNoXml() {
doReturn(mock(Set.class)).when(command).getMembers(any(), any());
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
result1 = new CliFunctionResult("member", false, "result1");
functionResults.add(result1);
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateGatewaySenderCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateGatewaySenderCommandTest.java
index 6456354..5875eda 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateGatewaySenderCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateGatewaySenderCommandTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.Version;
import org.apache.geode.internal.cache.InternalCache;
@@ -54,18 +54,18 @@ public class CreateGatewaySenderCommandTest {
private CreateGatewaySenderCommand command;
private InternalCache cache;
private List<CliFunctionResult> functionResults;
- private InternalClusterConfigurationService ccService;
+ private InternalConfigurationPersistenceService ccService;
private CliFunctionResult result1, result2;
private XmlEntity xmlEntity;
@Before
public void before() {
command = spy(CreateGatewaySenderCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
+ ccService = mock(InternalConfigurationPersistenceService.class);
xmlEntity = mock(XmlEntity.class);
cache = mock(InternalCache.class);
doReturn(cache).when(command).getCache();
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
functionResults = new ArrayList<>();
doReturn(functionResults).when(command).executeAndGetFunctionResult(any(), any(),
any(Set.class));
@@ -119,7 +119,7 @@ public class CreateGatewaySenderCommandTest {
@Test
public void whenNoCCService() {
doReturn(mock(Set.class)).when(command).getMembers(any(), any());
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
result1 = new CliFunctionResult("member", xmlEntity, "result1");
functionResults.add(result1);
gfsh.executeAndAssertThat(command,
@@ -131,7 +131,7 @@ public class CreateGatewaySenderCommandTest {
@Test
public void whenCommandOnMember() {
doReturn(mock(Set.class)).when(command).getMembers(any(), any());
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
result1 = new CliFunctionResult("member", xmlEntity, "result1");
functionResults.add(result1);
gfsh.executeAndAssertThat(command,
@@ -143,7 +143,7 @@ public class CreateGatewaySenderCommandTest {
@Test
public void whenNoXml() {
doReturn(mock(Set.class)).when(command).getMembers(any(), any());
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
result1 = new CliFunctionResult("member", false, "result1");
functionResults.add(result1);
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateIndexCommandDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateIndexCommandDUnitTest.java
index a83e6fa..6d4ad05 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateIndexCommandDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateIndexCommandDUnitTest.java
@@ -27,7 +27,7 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.RegionShortcut;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.test.dunit.IgnoredException;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
@@ -54,8 +54,8 @@ public class CreateIndexCommandDUnitTest {
// when locator started, the cacheConfig is null
locator.invoke(() -> {
- CacheConfig cacheConfig =
- ClusterStartupRule.getLocator().getSharedConfiguration().getCacheConfig("cluster");
+ CacheConfig cacheConfig = ClusterStartupRule.getLocator().getConfigurationPersistenceService()
+ .getCacheConfig("cluster");
assertThat(cacheConfig).isNull();
});
}
@@ -66,8 +66,8 @@ public class CreateIndexCommandDUnitTest {
.statusIsError().containsOutput("ERROR: Region not found : \"/noExist\"");
locator.invoke(() -> {
- InternalClusterConfigurationService configurationService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService configurationService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
CacheConfig cacheConfig = configurationService.getCacheConfig("cluster");
assertThat(cacheConfig.findRegionConfiguration("noExist")).isNull();
});
@@ -84,8 +84,8 @@ public class CreateIndexCommandDUnitTest {
// no region exists in cluster config
locator.invoke(() -> {
- InternalClusterConfigurationService configurationService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService configurationService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
CacheConfig cacheConfig = configurationService.getCacheConfig("cluster");
assertThat(cacheConfig.findRegionConfiguration("regionA")).isNull();
});
@@ -95,8 +95,8 @@ public class CreateIndexCommandDUnitTest {
// after index is created, the cluster config is not udpated with regionA or index
locator.invoke(() -> {
- InternalClusterConfigurationService configurationService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService configurationService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
assertThat(configurationService.getCacheConfig("cluster").findRegionConfiguration("regionA"))
.isNull();
});
@@ -107,8 +107,8 @@ public class CreateIndexCommandDUnitTest {
gfsh.executeAndAssertThat("create region --name=regionB --type=REPLICATE").statusIsSuccess();
locator.waitTillRegionsAreReadyOnServers("/regionB", 1);
locator.invoke(() -> {
- InternalClusterConfigurationService configurationService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService configurationService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
assertThat(configurationService.getConfiguration("cluster").getCacheXmlContent())
.contains("<region name=\"regionB\">");
});
@@ -117,8 +117,8 @@ public class CreateIndexCommandDUnitTest {
.statusIsSuccess();
locator.invoke(() -> {
- InternalClusterConfigurationService configurationService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService configurationService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
assertThat(configurationService.getConfiguration("cluster").getCacheXmlContent())
.contains("<region name=\"regionB\">").contains("<index").contains("expression=\"id\" ")
.contains("from-clause=\"/regionB\"").contains("name=\"myIndex\"")
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandDUnitTest.java
index 2f916db..5a1fd8a 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandDUnitTest.java
@@ -25,7 +25,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.jndi.JNDIInvoker;
import org.apache.geode.management.internal.configuration.domain.Configuration;
import org.apache.geode.management.internal.configuration.utils.XmlUtils;
@@ -70,8 +70,8 @@ public class CreateJndiBindingCommandDUnitTest {
// verify cluster config is updated
locator.invoke(() -> {
- InternalClusterConfigurationService ccService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService ccService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration configuration = ccService.getConfiguration("cluster");
Document document = XmlUtils.createDocumentFromXml(configuration.getCacheXmlContent());
NodeList jndiBindings = document.getElementsByTagName("jndi-binding");
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandTest.java
index 642ce6d..d827788 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandTest.java
@@ -43,7 +43,7 @@ import org.xml.sax.SAXException;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.cache.configuration.JndiBindingsType;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.internal.cli.GfshParseResult;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
@@ -105,13 +105,13 @@ public class CreateJndiBindingCommandTest {
@Test
public void returnsErrorIfBindingAlreadyExistsAndIfUnspecified()
throws ParserConfigurationException, SAXException, IOException {
- InternalClusterConfigurationService clusterConfigService =
- mock(InternalClusterConfigurationService.class);
+ InternalConfigurationPersistenceService clusterConfigService =
+ mock(InternalConfigurationPersistenceService.class);
CacheConfig cacheConfig = mock(CacheConfig.class);
when(cacheConfig.getJndiBindings()).thenReturn(bindings);
bindings.add(binding);
- doReturn(clusterConfigService).when(command).getConfigurationService();
+ doReturn(clusterConfigService).when(command).getConfigurationPersistenceService();
doReturn(cacheConfig).when(clusterConfigService).getCacheConfig(any());
gfsh.executeAndAssertThat(command,
@@ -122,11 +122,11 @@ public class CreateJndiBindingCommandTest {
@Test
public void skipsIfBindingAlreadyExistsAndIfSpecified()
throws ParserConfigurationException, SAXException, IOException {
- InternalClusterConfigurationService clusterConfigService =
- mock(InternalClusterConfigurationService.class);
+ InternalConfigurationPersistenceService clusterConfigService =
+ mock(InternalConfigurationPersistenceService.class);
CacheConfig cacheConfig = mock(CacheConfig.class);
- doReturn(clusterConfigService).when(command).getConfigurationService();
+ doReturn(clusterConfigService).when(command).getConfigurationPersistenceService();
doReturn(cacheConfig).when(clusterConfigService).getCacheConfig(any());
when(cacheConfig.getJndiBindings()).thenReturn(bindings);
bindings.add(binding);
@@ -140,13 +140,13 @@ public class CreateJndiBindingCommandTest {
@Test
public void skipsIfBindingAlreadyExistsAndIfSpecifiedTrue()
throws ParserConfigurationException, SAXException, IOException {
- InternalClusterConfigurationService clusterConfigService =
- mock(InternalClusterConfigurationService.class);
+ InternalConfigurationPersistenceService clusterConfigService =
+ mock(InternalConfigurationPersistenceService.class);
CacheConfig cacheConfig = mock(CacheConfig.class);
when(cacheConfig.getJndiBindings()).thenReturn(bindings);
bindings.add(binding);
- doReturn(clusterConfigService).when(command).getConfigurationService();
+ doReturn(clusterConfigService).when(command).getConfigurationPersistenceService();
doReturn(cacheConfig).when(clusterConfigService).getCacheConfig(any());
gfsh.executeAndAssertThat(command,
@@ -157,13 +157,13 @@ public class CreateJndiBindingCommandTest {
@Test
public void returnsErrorIfBindingAlreadyExistsAndIfSpecifiedFalse() {
- InternalClusterConfigurationService clusterConfigService =
- mock(InternalClusterConfigurationService.class);
+ InternalConfigurationPersistenceService clusterConfigService =
+ mock(InternalConfigurationPersistenceService.class);
CacheConfig cacheConfig = mock(CacheConfig.class);
when(cacheConfig.getJndiBindings()).thenReturn(bindings);
bindings.add(binding);
- doReturn(clusterConfigService).when(command).getConfigurationService();
+ doReturn(clusterConfigService).when(command).getConfigurationPersistenceService();
doReturn(cacheConfig).when(clusterConfigService).getCacheConfig(any());
gfsh.executeAndAssertThat(command,
@@ -176,7 +176,7 @@ public class CreateJndiBindingCommandTest {
public void whenNoMembersFoundAndNoClusterConfigServiceRunningThenError() {
doReturn(Collections.emptySet()).when(command).findMembers(any(), any());
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
gfsh.executeAndAssertThat(command,
COMMAND + " --type=SIMPLE --name=name --jdbc-driver-class=driver --connection-url=url")
@@ -185,12 +185,12 @@ public class CreateJndiBindingCommandTest {
@Test
public void whenNoMembersFoundAndClusterConfigRunningThenUpdateClusterConfig() {
- InternalClusterConfigurationService clusterConfigService =
- mock(InternalClusterConfigurationService.class);
+ InternalConfigurationPersistenceService clusterConfigService =
+ mock(InternalConfigurationPersistenceService.class);
CacheConfig cacheConfig = mock(CacheConfig.class);
doReturn(Collections.emptySet()).when(command).findMembers(any(), any());
- doReturn(clusterConfigService).when(command).getConfigurationService();
+ doReturn(clusterConfigService).when(command).getConfigurationPersistenceService();
doReturn(cacheConfig).when(clusterConfigService).getCacheConfig(any());
gfsh.executeAndAssertThat(command,
@@ -214,7 +214,7 @@ public class CreateJndiBindingCommandTest {
results.add(result);
doReturn(members).when(command).findMembers(any(), any());
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(results).when(command).executeAndGetFunctionResult(any(), any(), any());
gfsh.executeAndAssertThat(command,
@@ -249,12 +249,12 @@ public class CreateJndiBindingCommandTest {
"Tried creating jndi binding \"name\" on \"server1\"");
List<CliFunctionResult> results = new ArrayList<>();
results.add(result);
- InternalClusterConfigurationService clusterConfigService =
- mock(InternalClusterConfigurationService.class);
+ InternalConfigurationPersistenceService clusterConfigService =
+ mock(InternalConfigurationPersistenceService.class);
CacheConfig cacheConfig = mock(CacheConfig.class);
doReturn(members).when(command).findMembers(any(), any());
- doReturn(clusterConfigService).when(command).getConfigurationService();
+ doReturn(clusterConfigService).when(command).getConfigurationPersistenceService();
doReturn(results).when(command).executeAndGetFunctionResult(any(), any(), any());
doReturn(cacheConfig).when(clusterConfigService).getCacheConfig(any());
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommandDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommandDUnitTest.java
index ab274d3..2d5f994 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommandDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommandDUnitTest.java
@@ -23,7 +23,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.wan.MyAsyncEventListener;
import org.apache.geode.management.internal.cli.i18n.CliStrings;
import org.apache.geode.management.internal.cli.json.GfJsonException;
@@ -63,8 +63,8 @@ public class DestroyAsyncEventQueueCommandDUnitTest {
gfsh.executeAndAssertThat("list async-event-queues").statusIsSuccess();
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration config = service.getConfiguration("cluster");
assertThat(config.getCacheXmlContent()).contains("id=\"queue1\"");
});
@@ -75,8 +75,8 @@ public class DestroyAsyncEventQueueCommandDUnitTest {
// verify that aeq entry is deleted from cluster config
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration config = service.getConfiguration("cluster");
assertThat(config.getCacheXmlContent()).doesNotContain("id=\"queue1\"");
});
@@ -114,8 +114,8 @@ public class DestroyAsyncEventQueueCommandDUnitTest {
// verify that aeq entry is deleted from cluster config
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration config = service.getConfiguration("cluster");
assertThat(config.getCacheXmlContent()).doesNotContain("id=\"queue1\"");
});
@@ -135,8 +135,8 @@ public class DestroyAsyncEventQueueCommandDUnitTest {
// verify that aeq entry is deleted from cluster config
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration config = service.getConfiguration("group1");
assertThat(config.getCacheXmlContent()).doesNotContain("id=\"queue1\"");
});
@@ -155,8 +155,8 @@ public class DestroyAsyncEventQueueCommandDUnitTest {
// verify that aeq entry is not deleted from cluster config
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration config = service.getConfiguration("group1");
assertThat(config.getCacheXmlContent()).contains("id=\"queue1\"");
});
@@ -205,8 +205,8 @@ public class DestroyAsyncEventQueueCommandDUnitTest {
// verify that cluster config aeq entry for destroyed queue is deleted
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
System.out.println("cluster config: " + service.getConfiguration("cluster"));
Configuration config1 = service.getConfiguration("group1");
assertThat(config1.getCacheXmlContent()).doesNotContain("id=\"queue1\"");
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommandTest.java
index f1b8f8d..91a8386 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommandTest.java
@@ -36,7 +36,7 @@ import org.mockito.ArgumentCaptor;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
import org.apache.geode.management.internal.cli.functions.DestroyAsyncEventQueueFunction;
@@ -51,7 +51,7 @@ public class DestroyAsyncEventQueueCommandTest {
public static GfshParserRule gfsh = new GfshParserRule();
private DestroyAsyncEventQueueCommand command;
- private InternalClusterConfigurationService service;
+ private InternalConfigurationPersistenceService service;
private Map<String, Configuration> configurationMap;
private DistributedMember member1 = mock(DistributedMember.class);
private DistributedMember member2 = mock(DistributedMember.class);
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyGatewayReceiverCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyGatewayReceiverCommandTest.java
index 0cc6bd9..0ae21c6 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyGatewayReceiverCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyGatewayReceiverCommandTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.internal.cli.exceptions.UserErrorException;
@@ -50,18 +50,18 @@ public class DestroyGatewayReceiverCommandTest {
private DestroyGatewayReceiverCommand command;
private InternalCache cache;
private List<CliFunctionResult> functionResults;
- private InternalClusterConfigurationService ccService;
+ private InternalConfigurationPersistenceService ccService;
private CliFunctionResult result1;
private XmlEntity xmlEntity;
@Before
public void setUp() throws Exception {
command = spy(DestroyGatewayReceiverCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
+ ccService = mock(InternalConfigurationPersistenceService.class);
xmlEntity = mock(XmlEntity.class);
cache = mock(InternalCache.class);
doReturn(cache).when(command).getCache();
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
functionResults = new ArrayList<>();
doReturn(functionResults).when(command).executeAndGetFunctionResult(any(), any(),
any(Set.class));
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyGatewaySenderCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyGatewaySenderCommandTest.java
index 2a16347..83371b6 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyGatewaySenderCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyGatewaySenderCommandTest.java
@@ -32,7 +32,7 @@ import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
import org.apache.geode.management.internal.configuration.domain.XmlEntity;
@@ -49,18 +49,18 @@ public class DestroyGatewaySenderCommandTest {
private DestroyGatewaySenderCommand command;
private InternalCache cache;
private List<CliFunctionResult> functionResults;
- private InternalClusterConfigurationService ccService;
+ private InternalConfigurationPersistenceService ccService;
private CliFunctionResult result1, result2;
private XmlEntity xmlEntity;
@Before
public void before() throws Exception {
command = spy(DestroyGatewaySenderCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
+ ccService = mock(InternalConfigurationPersistenceService.class);
xmlEntity = mock(XmlEntity.class);
cache = mock(InternalCache.class);
doReturn(cache).when(command).getCache();
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
functionResults = new ArrayList<>();
doReturn(functionResults).when(command).executeAndGetFunctionResult(any(), any(),
any(Set.class));
@@ -115,7 +115,7 @@ public class DestroyGatewaySenderCommandTest {
@Test
public void whenNoCCService() {
doReturn(mock(Set.class)).when(command).getMembers(any(), any());
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
result1 = new CliFunctionResult("member", xmlEntity, "result1");
functionResults.add(result1);
parser.executeAndAssertThat(command, "destroy gateway-sender --id=1").statusIsSuccess()
@@ -126,7 +126,7 @@ public class DestroyGatewaySenderCommandTest {
@Test
public void whenCommandOnMember() {
doReturn(mock(Set.class)).when(command).getMembers(any(), any());
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
result1 = new CliFunctionResult("member", xmlEntity, "result1");
functionResults.add(result1);
parser.executeAndAssertThat(command, "destroy gateway-sender --member=xyz --id=1")
@@ -137,7 +137,7 @@ public class DestroyGatewaySenderCommandTest {
@Test
public void whenNoXml() {
doReturn(mock(Set.class)).when(command).getMembers(any(), any());
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
result1 = new CliFunctionResult("member", false, "result1");
functionResults.add(result1);
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommandDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommandDUnitTest.java
index 4bea070..247d6ea 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommandDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommandDUnitTest.java
@@ -25,7 +25,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.jndi.JNDIInvoker;
import org.apache.geode.management.internal.configuration.domain.Configuration;
import org.apache.geode.management.internal.configuration.utils.XmlUtils;
@@ -73,8 +73,8 @@ public class DestroyJndiBindingCommandDUnitTest {
// verify cluster config is updated
locator.invoke(() -> {
- InternalClusterConfigurationService ccService =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService ccService =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration configuration = ccService.getConfiguration("cluster");
Document document = XmlUtils.createDocumentFromXml(configuration.getCacheXmlContent());
NodeList jndiBindings = document.getElementsByTagName("jndi-binding");
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommandTest.java
index 86a1458..b647cf8 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyJndiBindingCommandTest.java
@@ -40,7 +40,7 @@ import org.mockito.ArgumentCaptor;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.configuration.CacheConfig;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
import org.apache.geode.management.internal.cli.functions.CreateJndiBindingFunction;
@@ -58,7 +58,7 @@ public class DestroyJndiBindingCommandTest {
private DestroyJndiBindingCommand command;
private InternalCache cache;
private CacheConfig cacheConfig;
- private InternalClusterConfigurationService ccService;
+ private InternalConfigurationPersistenceService ccService;
private static String COMMAND = "destroy jndi-binding ";
@@ -68,10 +68,10 @@ public class DestroyJndiBindingCommandTest {
command = spy(DestroyJndiBindingCommand.class);
doReturn(cache).when(command).getCache();
cacheConfig = mock(CacheConfig.class);
- ccService = mock(InternalClusterConfigurationService.class);
+ ccService = mock(InternalConfigurationPersistenceService.class);
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
when(ccService.getCacheConfig(any())).thenReturn(cacheConfig);
doCallRealMethod().when(ccService).updateCacheConfig(any(), any());
when(ccService.getConfigurationRegion()).thenReturn(mock(Region.class));
@@ -110,7 +110,7 @@ public class DestroyJndiBindingCommandTest {
@Test
public void whenNoMembersFoundAndNoClusterConfigServiceRunningThenError() {
doReturn(Collections.emptySet()).when(command).findMembers(any(), any());
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
gfsh.executeAndAssertThat(command, COMMAND + " --name=name").statusIsSuccess()
.containsOutput("No members found").hasFailToPersistError();
@@ -140,7 +140,7 @@ public class DestroyJndiBindingCommandTest {
results.add(result);
doReturn(members).when(command).findMembers(any(), any());
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(results).when(command).executeAndGetFunctionResult(any(), any(), any());
gfsh.executeAndAssertThat(command, COMMAND + " --name=name").statusIsSuccess()
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandDUnitTest.java
index aba0a14..9a186fb 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandDUnitTest.java
@@ -28,7 +28,7 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.Cache;
import org.apache.geode.distributed.Locator;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.management.internal.configuration.domain.Configuration;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
@@ -113,8 +113,8 @@ public class DestroyRegionCommandDUnitTest {
locator.waitTillRegionsAreReadyOnServers("/region1", 3);
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration group1Config = service.getConfiguration("group1");
assertThat(group1Config.getCacheXmlContent()).contains("<region name=\"region1\">\n"
+ " <region-attributes data-policy=\"empty\" scope=\"distributed-ack\"/>");
@@ -129,8 +129,8 @@ public class DestroyRegionCommandDUnitTest {
// verify that all cc entries are deleted, no matter what the scope is
locator.invoke(() -> {
- InternalClusterConfigurationService service =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService service =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Configuration group1Config = service.getConfiguration("group1");
assertThat(group1Config.getCacheXmlContent()).doesNotContain("region1");
@@ -151,8 +151,8 @@ public class DestroyRegionCommandDUnitTest {
// Make sure the region exists in the cluster config
locator.invoke(() -> {
- InternalClusterConfigurationService sharedConfig =
- ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ((InternalLocator) Locator.getLocator()).getConfigurationPersistenceService();
assertThat(sharedConfig.getConfiguration("cluster").getCacheXmlContent())
.contains("Customer");
});
@@ -163,8 +163,8 @@ public class DestroyRegionCommandDUnitTest {
// make sure the region was removed from cluster config
locator.invoke(() -> {
- InternalClusterConfigurationService sharedConfig =
- ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ((InternalLocator) Locator.getLocator()).getConfigurationPersistenceService();
assertThat(sharedConfig.getConfiguration("cluster").getCacheXmlContent())
.doesNotContain("Customer");
});
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandTest.java
index 62db86a..6ebbf41 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.internal.cli.GfshParseResult;
import org.apache.geode.management.internal.cli.functions.CliFunctionResult;
@@ -53,15 +53,15 @@ public class DestroyRegionCommandTest {
private DestroyRegionCommand command;
private CommandResult result;
private CliFunctionResult result1, result2;
- private InternalClusterConfigurationService ccService;
+ private InternalConfigurationPersistenceService ccService;
XmlEntity xmlEntity;
@Before
public void before() throws Exception {
xmlEntity = mock(XmlEntity.class);
command = spy(DestroyRegionCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
- doReturn(ccService).when(command).getConfigurationService();
+ ccService = mock(InternalConfigurationPersistenceService.class);
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
doReturn(mock(InternalCache.class)).when(command).getCache();
List<CliFunctionResult> functionResults = new ArrayList<>();
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index 65a8154..8b7762b 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -33,7 +33,7 @@ import org.junit.rules.TemporaryFolder;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.Region;
import org.apache.geode.distributed.Locator;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.SnapshotTestUtil;
@@ -197,8 +197,8 @@ public class DiskStoreCommandsDUnitTest {
private boolean diskStoreExistsInClusterConfig(MemberVM jmxManager) {
boolean result = jmxManager.invoke(() -> {
- InternalClusterConfigurationService sharedConfig =
- ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ((InternalLocator) Locator.getLocator()).getConfigurationPersistenceService();
String xmlFromConfig;
xmlFromConfig = sharedConfig.getConfiguration(GROUP).getCacheXmlContent();
return xmlFromConfig.contains(DISKSTORE);
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GfshCommandJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GfshCommandJUnitTest.java
index 177c4be..3417085 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GfshCommandJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GfshCommandJUnitTest.java
@@ -27,7 +27,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.management.cli.Result;
import org.apache.geode.management.internal.cli.exceptions.EntityNotFoundException;
import org.apache.geode.management.internal.cli.result.ResultBuilder;
@@ -39,25 +39,25 @@ public class GfshCommandJUnitTest {
private InternalGfshCommand command;
private Gfsh gfsh;
- private InternalClusterConfigurationService clusterConfigurationService;
+ private InternalConfigurationPersistenceService clusterConfigurationService;
@Before
public void before() throws Exception {
command = spy(InternalGfshCommand.class);
gfsh = mock(Gfsh.class);
- clusterConfigurationService = mock(InternalClusterConfigurationService.class);
+ clusterConfigurationService = mock(InternalConfigurationPersistenceService.class);
}
@Test
public void persistClusterConfiguration() throws Exception {
- when(command.getConfigurationService()).thenReturn(null);
+ when(command.getConfigurationPersistenceService()).thenReturn(null);
Result result = ResultBuilder.createInfoResult("info");
Runnable runnable = mock(Runnable.class);
command.persistClusterConfiguration(result, runnable);
assertThat(result.failedToPersist()).isTrue();
- when(command.getConfigurationService()).thenReturn(clusterConfigurationService);
+ when(command.getConfigurationPersistenceService()).thenReturn(clusterConfigurationService);
command.persistClusterConfiguration(result, runnable);
assertThat(result.failedToPersist()).isFalse();
}
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/IndexCommandsShareConfigurationDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/IndexCommandsShareConfigurationDUnitTest.java
index 9d89ae3..4e33a40 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/IndexCommandsShareConfigurationDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/IndexCommandsShareConfigurationDUnitTest.java
@@ -28,7 +28,7 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.query.Index;
import org.apache.geode.distributed.Locator;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.internal.cli.domain.Stock;
@@ -86,8 +86,8 @@ public class IndexCommandsShareConfigurationDUnitTest {
gfsh.executeAndAssertThat(CliStrings.LIST_INDEX).statusIsSuccess().containsOutput(indexName);
locator.invoke(() -> {
- InternalClusterConfigurationService sharedConfig =
- ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ((InternalLocator) Locator.getLocator()).getConfigurationPersistenceService();
String xmlFromConfig = sharedConfig.getConfiguration(groupName).getCacheXmlContent();
assertThat(xmlFromConfig).contains(indexName);
});
@@ -99,8 +99,8 @@ public class IndexCommandsShareConfigurationDUnitTest {
gfsh.executeAndAssertThat(createStringBuilder.toString()).statusIsSuccess();
locator.invoke(() -> {
- InternalClusterConfigurationService sharedConfig =
- ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ((InternalLocator) Locator.getLocator()).getConfigurationPersistenceService();
String xmlFromConfig = sharedConfig.getConfiguration(groupName).getCacheXmlContent();
assertThat(xmlFromConfig).doesNotContain(indexName);
});
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListJndiBindingCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListJndiBindingCommandTest.java
index 5fa36fc..0a52c5e 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListJndiBindingCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListJndiBindingCommandTest.java
@@ -30,7 +30,7 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.apache.geode.cache.configuration.CacheConfig;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.test.junit.categories.UnitTest;
import org.apache.geode.test.junit.rules.GfshParserRule;
@@ -41,22 +41,22 @@ public class ListJndiBindingCommandTest {
public static GfshParserRule gfsh = new GfshParserRule();
private ListJndiBindingCommand command;
- private InternalClusterConfigurationService ccService;
+ private InternalConfigurationPersistenceService ccService;
private CacheConfig cacheConfig;
@Before
public void setUp() throws Exception {
command = spy(ListJndiBindingCommand.class);
- ccService = mock(InternalClusterConfigurationService.class);
- doReturn(ccService).when(command).getConfigurationService();
+ ccService = mock(InternalConfigurationPersistenceService.class);
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
cacheConfig = mock(CacheConfig.class);
when(ccService.getCacheConfig("cluster")).thenReturn(cacheConfig);
}
@Test
public void noServiceNoMember() {
- doReturn(null).when(command).getConfigurationService();
+ doReturn(null).when(command).getConfigurationPersistenceService();
doReturn(Collections.emptySet()).when(command).findMembers(null, null);
gfsh.executeAndAssertThat(command, "list jndi-binding").statusIsError()
.containsOutput("No members found");
@@ -64,7 +64,7 @@ public class ListJndiBindingCommandTest {
@Test
public void hasServiceNoBindingNoMember() {
- doReturn(ccService).when(command).getConfigurationService();
+ doReturn(ccService).when(command).getConfigurationPersistenceService();
when(cacheConfig.getJndiBindings()).thenReturn(Collections.emptyList());
doReturn(Collections.emptySet()).when(command).findMembers(null, null);
gfsh.executeAndAssertThat(command, "list jndi-binding").statusIsSuccess()
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfig.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfig.java
index 54503ec..4488094 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfig.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfig.java
@@ -39,7 +39,7 @@ import java.util.stream.Stream;
import org.apache.commons.lang.StringUtils;
import org.apache.geode.cache.Cache;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.ClassPathLoader;
import org.apache.geode.internal.DeployedJar;
@@ -94,7 +94,8 @@ public class ClusterConfig implements Serializable {
// verify info exists in memory
locatorVM.invoke(() -> {
InternalLocator internalLocator = ClusterStartupRule.getLocator();
- InternalClusterConfigurationService sc = internalLocator.getSharedConfiguration();
+ InternalConfigurationPersistenceService sc =
+ internalLocator.getConfigurationPersistenceService();
// verify no extra configs exist in memory
Set<String> actualGroupConfigs = sc.getConfigurationRegion().keySet();
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
index 42777ee..5872b8c 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
@@ -30,7 +30,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.management.internal.cli.i18n.CliStrings;
@@ -78,7 +78,7 @@ public class ClusterConfigWithSecurityDUnitTest {
// the second locator should inherit the first locator's security props
locator1.invoke(() -> {
InternalLocator locator = ClusterStartupRule.getLocator();
- InternalClusterConfigurationService sc = locator.getSharedConfiguration();
+ InternalConfigurationPersistenceService sc = locator.getConfigurationPersistenceService();
Properties clusterConfigProps = sc.getConfiguration("cluster").getGemfireProperties();
assertThat(clusterConfigProps.getProperty(SECURITY_MANAGER))
.isEqualTo(SimpleTestSecurityManager.class.getName());
@@ -98,7 +98,7 @@ public class ClusterConfigWithSecurityDUnitTest {
locator0.invoke(() -> {
InternalLocator locator = ClusterStartupRule.getLocator();
- InternalClusterConfigurationService sc = locator.getSharedConfiguration();
+ InternalConfigurationPersistenceService sc = locator.getConfigurationPersistenceService();
Properties properties = sc.getConfiguration("cluster").getGemfireProperties();
assertThat(properties.getProperty(MCAST_PORT)).isEqualTo("0");
assertThat(properties.getProperty(LOG_FILE_SIZE_LIMIT)).isEqualTo("8000");
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceUsingDirDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ConfigurationPersistenceServiceUsingDirDUnitTest.java
similarity index 96%
rename from geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceUsingDirDUnitTest.java
rename to geode-core/src/test/java/org/apache/geode/management/internal/configuration/ConfigurationPersistenceServiceUsingDirDUnitTest.java
index 1993930..d6b04cd 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceUsingDirDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ConfigurationPersistenceServiceUsingDirDUnitTest.java
@@ -44,7 +44,7 @@ import org.junit.experimental.categories.Category;
import org.apache.geode.cache.Region;
import org.apache.geode.distributed.Locator;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
@@ -53,7 +53,7 @@ import org.apache.geode.test.junit.categories.FlakyTest;
import org.apache.geode.util.test.TestUtil;
@Category({DistributedTest.class, FlakyTest.class}) // GEODE-1165
-public class ClusterConfigurationServiceUsingDirDUnitTest extends JUnit4CacheTestCase {
+public class ConfigurationPersistenceServiceUsingDirDUnitTest extends JUnit4CacheTestCase {
@Override
public final void preTearDownCacheTestCase() throws Exception {
@@ -65,7 +65,8 @@ public class ClusterConfigurationServiceUsingDirDUnitTest extends JUnit4CacheTes
return;
}
- InternalClusterConfigurationService sharedConfig = locator.getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ locator.getConfigurationPersistenceService();
if (sharedConfig != null) {
sharedConfig.destroySharedConfiguration();
}
@@ -261,8 +262,8 @@ public class ClusterConfigurationServiceUsingDirDUnitTest extends JUnit4CacheTes
private void copyClusterXml(final VM vm, final String clusterXml) {
vm.invoke("Copying new cluster.xml from " + clusterXml, () -> {
- String clusterXmlPath =
- TestUtil.getResourcePath(ClusterConfigurationServiceUsingDirDUnitTest.class, clusterXml);
+ String clusterXmlPath = TestUtil
+ .getResourcePath(ConfigurationPersistenceServiceUsingDirDUnitTest.class, clusterXml);
InputStream cacheXml = new FileInputStream(clusterXmlPath);
assertNotNull("Could not create InputStream from " + clusterXmlPath, cacheXml);
Files.createDirectories(Paths.get("cluster_config", "cluster"));
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/SharedConfigurationTestUtils.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/SharedConfigurationTestUtils.java
index 9d570ec..106271a 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/SharedConfigurationTestUtils.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/SharedConfigurationTestUtils.java
@@ -14,7 +14,7 @@
*/
package org.apache.geode.management.internal.configuration;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.test.dunit.SerializableRunnable;
import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
@@ -26,7 +26,8 @@ public class SharedConfigurationTestUtils {
public void run() {
InternalLocator locator = InternalLocator.getLocator();
if (locator != null) {
- InternalClusterConfigurationService sharedConfig = locator.getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ locator.getConfigurationPersistenceService();
if (sharedConfig != null) {
sharedConfig.destroySharedConfiguration();
}
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/functions/GetClusterConfigurationFunctionTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/functions/GetClusterConfigurationFunctionTest.java
index 34a3151..43403ec 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/functions/GetClusterConfigurationFunctionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/functions/GetClusterConfigurationFunctionTest.java
@@ -39,7 +39,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
import org.apache.geode.cache.execute.FunctionContext;
import org.apache.geode.cache.execute.ResultSender;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.management.internal.configuration.messages.ConfigurationResponse;
import org.apache.geode.test.junit.categories.UnitTest;
@@ -52,7 +52,7 @@ public class GetClusterConfigurationFunctionTest {
private InternalLocator mockedLocator;
private FunctionContext mockedFunctionContext;
private ResultSender<Object> mockedResultSender;
- private InternalClusterConfigurationService mockedConfigurationService;
+ private InternalConfigurationPersistenceService mockedConfigurationService;
private GetClusterConfigurationFunction getClusterConfigurationFunction;
@Before
@@ -60,7 +60,7 @@ public class GetClusterConfigurationFunctionTest {
mockedResultSender = mock(ResultSender.class);
mockedLocator = mock(InternalLocator.class);
mockedFunctionContext = mock(FunctionContext.class);
- mockedConfigurationService = mock(InternalClusterConfigurationService.class);
+ mockedConfigurationService = mock(InternalConfigurationPersistenceService.class);
getClusterConfigurationFunction = new GetClusterConfigurationFunction();
when(mockedLocator.isSharedConfigurationEnabled()).thenReturn(true);
@@ -89,7 +89,7 @@ public class GetClusterConfigurationFunctionTest {
public void executeShouldReturnExceptionWhenClusterConfigurationServiceIsEnabledButFailuresOccurWhileRetrievingIt() {
when(mockedConfigurationService.createConfigurationResponse(any()))
.thenThrow(new RuntimeException("Mocked Exception."));
- when(mockedLocator.getSharedConfiguration()).thenReturn(mockedConfigurationService);
+ when(mockedLocator.getConfigurationPersistenceService()).thenReturn(mockedConfigurationService);
ArgumentCaptor<Exception> argumentCaptor = ArgumentCaptor.forClass(Exception.class);
assertThatCode(() -> getClusterConfigurationFunction.execute(mockedFunctionContext))
@@ -113,7 +113,7 @@ public class GetClusterConfigurationFunctionTest {
public void executeShouldReturnTheRequestConfigurationWhenClusterConfigurationServiceIsEnabled() {
Set<String> requestedGroups = new HashSet<>(Arrays.asList("group1", "group2"));
when(mockedFunctionContext.getArguments()).thenReturn(requestedGroups);
- when(mockedLocator.getSharedConfiguration()).thenReturn(mockedConfigurationService);
+ when(mockedLocator.getConfigurationPersistenceService()).thenReturn(mockedConfigurationService);
ConfigurationResponse mockedResponse = new ConfigurationResponse();
when(mockedConfigurationService.createConfigurationResponse(any())).thenReturn(mockedResponse);
ArgumentCaptor<ConfigurationResponse> argumentCaptor =
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/utils/XmlUtilsAddNewNodeJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/utils/XmlUtilsAddNewNodeJUnitTest.java
index 64831af..4b5e92e 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/utils/XmlUtilsAddNewNodeJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/utils/XmlUtilsAddNewNodeJUnitTest.java
@@ -37,7 +37,7 @@ import org.xml.sax.SAXException;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.CacheFactory;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.extension.Extension;
import org.apache.geode.internal.cache.xmlcache.CacheXml;
import org.apache.geode.management.internal.configuration.domain.XmlEntity;
@@ -47,7 +47,8 @@ import org.apache.geode.test.junit.categories.IntegrationTest;
/**
* Unit tests for {@link XmlUtils#addNewNode(Document, XmlEntity)} and
* {@link XmlUtils#deleteNode(Document, XmlEntity)}. Simulates the
- * {@link InternalClusterConfigurationService} method of extracting {@link XmlEntity} from the new
+ * {@link InternalConfigurationPersistenceService} method of extracting {@link XmlEntity} from the
+ * new
* config
* and applying it to the current shared config.
*
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
index d174d9a..334eb2b 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -18,7 +18,7 @@ import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
import static org.apache.geode.distributed.ConfigurationProperties.LOG_FILE;
import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
import static org.apache.geode.distributed.ConfigurationProperties.STATISTIC_ARCHIVE_FILE;
-import static org.apache.geode.distributed.internal.InternalClusterConfigurationService.CLUSTER_CONFIG_DISK_DIR_PREFIX;
+import static org.apache.geode.distributed.internal.InternalConfigurationPersistenceService.CLUSTER_CONFIG_DISK_DIR_PREFIX;
import static org.apache.geode.test.dunit.DistributedTestUtils.getAllDistributedSystemProperties;
import static org.apache.geode.test.dunit.DistributedTestUtils.unregisterInstantiatorsInThisVM;
import static org.apache.geode.test.dunit.Invoke.invokeInEveryVM;
diff --git a/geode-core/src/test/resources/org/apache/geode/management/internal/configuration/cluster-region.xml b/geode-core/src/test/resources/org/apache/geode/management/internal/configuration/cluster-region.xml
index c97f7dc..bd0ae33 100644
--- a/geode-core/src/test/resources/org/apache/geode/management/internal/configuration/cluster-region.xml
+++ b/geode-core/src/test/resources/org/apache/geode/management/internal/configuration/cluster-region.xml
@@ -16,7 +16,7 @@
limitations under the License.
-->
<!--
- Used by org/apache/geode/management/internal/configuration/ClusterConfigurationServiceUsingDirDUnitTest.java
+ Used by org/apache/geode/management/internal/configuration/ConfigurationPersistenceServiceUsingDirDUnitTest.java
-->
<cache xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
index 5d8a4f0..0e99d9d 100755
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
@@ -39,7 +39,7 @@ import org.apache.geode.cache.lucene.internal.cli.functions.LuceneListIndexFunct
import org.apache.geode.cache.lucene.internal.cli.functions.LuceneSearchIndexFunction;
import org.apache.geode.cache.lucene.internal.security.LucenePermission;
import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.execute.AbstractExecution;
import org.apache.geode.management.cli.CliMetaData;
@@ -200,8 +200,8 @@ public class LuceneIndexCommands extends InternalGfshCommand {
result = ResultBuilder.buildResult(tabularResult);
if (xmlEntity != null) {
persistClusterConfiguration(result, () -> {
- ((InternalClusterConfigurationService) getConfigurationService()).addXmlEntity(xmlEntity,
- null);
+ ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
+ .addXmlEntity(xmlEntity, null);
});
}
return result;
@@ -294,8 +294,8 @@ public class LuceneIndexCommands extends InternalGfshCommand {
if (xmlEntity != null) {
persistClusterConfiguration(result, () -> {
// Delete the xml entity to remove the index(es) in all groups
- ((InternalClusterConfigurationService) getConfigurationService()).deleteXmlEntity(xmlEntity,
- null);
+ ((InternalConfigurationPersistenceService) getConfigurationPersistenceService())
+ .deleteXmlEntity(xmlEntity, null);
});
}
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java
index b629eaa..7000138 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java
@@ -40,8 +40,8 @@ import org.apache.geode.cache.lucene.LuceneServiceProvider;
import org.apache.geode.cache.lucene.internal.cli.LuceneCliStrings;
import org.apache.geode.cache.lucene.internal.repository.serializer.PrimitiveSerializer;
import org.apache.geode.cache.lucene.internal.xml.LuceneXmlConstants;
-import org.apache.geode.distributed.ClusterConfigurationService;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.ConfigurationPersistenceService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.management.internal.cli.i18n.CliStrings;
import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
@@ -263,8 +263,9 @@ public class LuceneClusterConfigurationDUnitTest {
SerializableRunnableIF verifyClusterConfiguration(boolean verifyIndexesExist) {
return () -> {
InternalLocator internalLocator = ClusterStartupRule.getLocator();
- InternalClusterConfigurationService sc = internalLocator.getSharedConfiguration();
- Configuration config = sc.getConfiguration(ClusterConfigurationService.CLUSTER_CONFIG);
+ InternalConfigurationPersistenceService sc =
+ internalLocator.getConfigurationPersistenceService();
+ Configuration config = sc.getConfiguration(ConfigurationPersistenceService.CLUSTER_CONFIG);
String xmlContent = config.getCacheXmlContent();
String luceneIndex0Config = "<" + LuceneXmlConstants.PREFIX + ":" + LuceneXmlConstants.INDEX
+ " xmlns:lucene=\"" + LuceneXmlConstants.NAMESPACE + "\" " + LuceneXmlConstants.NAME
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateDestroyGatewaySenderCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateDestroyGatewaySenderCommandDUnitTest.java
index f98c4c0..08fcbc6 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateDestroyGatewaySenderCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateDestroyGatewaySenderCommandDUnitTest.java
@@ -105,7 +105,7 @@ public class CreateDestroyGatewaySenderCommandDUnitTest implements Serializable
server3);
locatorSite1.invoke(() -> {
- String xml = ClusterStartupRule.getLocator().getSharedConfiguration()
+ String xml = ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).contains("<gateway-sender id=\"ln\" remote-distributed-system-id=\"2\"/>");
});
@@ -120,7 +120,7 @@ public class CreateDestroyGatewaySenderCommandDUnitTest implements Serializable
server3);
locatorSite1.invoke(() -> {
- String xml = ClusterStartupRule.getLocator().getSharedConfiguration()
+ String xml = ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getConfiguration("cluster").getCacheXmlContent();
assertThat(xml).doesNotContain("gateway-sender id=\"ln\"");
});
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/DestroyGatewayReceiverCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/DestroyGatewayReceiverCommandDUnitTest.java
index 8e35cb0..949c665 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/DestroyGatewayReceiverCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/DestroyGatewayReceiverCommandDUnitTest.java
@@ -97,7 +97,7 @@ public class DestroyGatewayReceiverCommandDUnitTest {
private void verifyConfigHasGatewayReceiver(String groupName) {
locatorSite1.invoke(() -> {
- String sharedConfigXml = ClusterStartupRule.getLocator().getSharedConfiguration()
+ String sharedConfigXml = ClusterStartupRule.getLocator().getConfigurationPersistenceService()
.getConfiguration(groupName).getCacheXmlContent();
assertThat(sharedConfigXml).contains("<gateway-receiver");
});
@@ -105,8 +105,8 @@ public class DestroyGatewayReceiverCommandDUnitTest {
private void verifyConfigDoesNotHaveGatewayReceiver(String groupName) {
locatorSite1.invoke(() -> {
- Configuration groupConfig =
- ClusterStartupRule.getLocator().getSharedConfiguration().getConfiguration(groupName);
+ Configuration groupConfig = ClusterStartupRule.getLocator()
+ .getConfigurationPersistenceService().getConfiguration(groupName);
String sharedConfigXml = groupConfig == null ? "" : groupConfig.getCacheXmlContent();
// Null or emnpty XML doesn't have gateway-receiver element, so it's OK
if (StringUtils.isNotEmpty(sharedConfigXml)) {
diff --git a/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRuntimeCommandDUnitTest.java b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRuntimeCommandDUnitTest.java
index 2fe6450..7900666 100644
--- a/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRuntimeCommandDUnitTest.java
+++ b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRuntimeCommandDUnitTest.java
@@ -30,7 +30,7 @@ import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.apache.geode.distributed.internal.DistributionConfig;
-import org.apache.geode.distributed.internal.InternalClusterConfigurationService;
+import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.logging.LogWriterImpl;
import org.apache.geode.management.cli.Result;
@@ -1194,8 +1194,8 @@ public class AlterRuntimeCommandDUnitTest {
gfsh.executeAndAssertThat(command).statusIsSuccess();
locator.invoke(() -> {
- InternalClusterConfigurationService sharedConfig =
- ClusterStartupRule.getLocator().getSharedConfiguration();
+ InternalConfigurationPersistenceService sharedConfig =
+ ClusterStartupRule.getLocator().getConfigurationPersistenceService();
Properties properties = sharedConfig.getConfiguration("Group1").getGemfireProperties();
assertThat(properties.get(LOG_LEVEL)).isEqualTo("fine");
});
--
To stop receiving notification emails like this one, please contact
jinmeiliao@apache.org.